CodeMosa

Master LeetCode Patterns

4 Problems

Trie Practice Problems

Prefix trie for dictionary operations and bitwise XOR tricks.

Back to Collections

Relevant Patterns

#
Study these pattern guides before tackling the problems. Understanding the core concepts will help you solve them more efficiently.

Practice Problems

#
Show 2 hints
  • Map children and end flags; operations run in O(L).
  • Normalize inputs to consistent casing if needed.
Show 2 hints
  • Use dot as wildcard; DFS from nodes matching current prefix.
  • Store children in maps for sparse alphabets.
Show 2 hints
  • Bitwise trie from MSB to LSB; greedily take opposite bit when possible.
  • Mask to fixed bit‑length (e.g., 31..0) for consistency.
Show 2 hints
  • Backtracking guided by trie; prune when path not in trie.
  • Mark visited cells; restore on backtrack.

Track Your Progress

Mark problems as complete as you solve them. Come back anytime to continue where you left off.