emilcecarlisa / ads-tries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

T9 Dictionary

Use

Install

$ git clone <repo> && cd <repo>
$ npm install

Run

This week has a nifty visualization! If you run the server locally you can see:

  1. A T9 keyboard backed by your trie
  2. A performance profiler, comparing different implementations of the prefix dictionary interface

To run the server, type

$ npm start

This should open the browser automatically, if not navigate to localhost:9000

Test

$ npm test

Runs jest in watch mode

Assignment

Core

Implement the Trie class to pass the tests

Play with your trie implementation using the visualization. Does it behave the way you expected?

Optional

  1. Implement a compressed radix tree, as in the discussion questions or this article
    • Add it to the data structure list so that the tests run against it and it appears in the performance profiler
    • How does performance compare to the uncompressed trie? To the word list?
  2. Currently, lookupPrefix returns an array. Modify it to return a generator function instead.

Reference

About


Languages

Language:JavaScript 97.2%Language:Dockerfile 2.7%Language:Shell 0.1%