208. Implement Trie Prefix Tree

Practice Implement Trie Prefix Tree for free on NudgeCode: Medium, Binary Tree pattern. Write it in Python or JavaScript, run the tests in your browser, and ask for a hint when you are stuck.

Build a trie (prefix tree) for lowercase words:

Each test is a list of operations and their arguments; the expected output lists what each call returns (null for calls that return nothing).

Example

["Trie","insert","search","search","startsWith","insert","search"]
[[],["apple"],["apple"],["app"],["app"],["app"],["app"]]
->  [null,null,true,false,true,null,true]

Constraints