Design Add and Search Words
Medium
Trie
Design a structure supporting addWord w and search w, where a search word may contain '.' that matches any single letter. Print true/false for each search.
Constraints
1 <= q <= 10^4 1 <= len(w) <= 25 Lowercase letters and '.' (search only)
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.