Implement Trie (Prefix Tree)
Medium
Trie
Implement a trie supporting insert w, search w (exact word) and startsWith p. Print true/false for each search and startsWith operation, one per line.
Constraints
1 <= q <= 3 * 10^4 1 <= len(w) <= 2000 Lowercase English letters
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.