Trace a search
Standard · Trace the algorithm · about 6 min
Follow a search for ca in a trie that holds cat, cap, car and dog. Answer each question before the step plays.
Example 1
Input:
{"text":"cat cap car dog","pattern":"ca","op":"search"}
Output:
false
Constraints
- The trace uses the input shown.
Learn the idea first: Tries: insert, search, prefix, a visual lesson.
More Tries: insert, search, prefix problems
- Node count Warm-up
- Starts-with Warm-up
- Implement a trie Standard
- Longest common prefix Standard
- Word dictionary with wildcard Challenge