Coding

Implement a Trie

Implement a Trie for prefix matching.

Input: insert("hello"), startsWith("hel")

Output: TRUE

Explanation: Traverses the Trie nodes to confirm that the prefix "hel" actively exists within the inserted word "hello".

Was asked at

Practice this question with AI

First session is free - no credit card required.

Go Premium

More interviews, more skills, more success.

Practice More Questions

Interview question asked to Software Engineers interviewing at PayPal, Zalora, Braze and other companies. Original question asked: Implement a Trie.