← Questions
Implement a trie (prefix tree)
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Implement a prefix tree over strings: insert a word, check whether a whole word is present, and check whether any stored word starts with a given prefix. Design the classes so that new operations can be added later without rewriting the structure, and explain the time and space cost of each operation.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding
