autocomplete: implement stub
autocomplete: implement stub: a task in smol-software-harbor (Harbor dataset). Trie.withPrefix(prefix) in lib/trie.js is a stub that always returns . Implement it: return every stored word starting with prefix , sorted alphabetically, including the prefix itself when it is a word; an unknown…
The task
`Trie.withPrefix(prefix)` in `lib/trie.js` is a stub that always returns `[]`. Implement it: return every stored word starting with `prefix`, sorted alphabetically, including the prefix itself when it is a word; an unknown prefix gives `[]`. Run `node --test test/*.test.js`.
Part of efederici/smol-software-harbor.