Skip to content

Latest commit

 

History

History

README.md

Trie

Prefix tree (Trie) data structure and string-based problems.

Key Concepts Covered

  • Trie node structure
  • Insert, search, and prefix operations
  • Word dictionary problems
  • Autocomplete systems
  • Longest common prefix
  • Word search in matrix
  • XOR maximum problems using binary trie

Tips

  • Trie excels at prefix-based queries
  • Each node typically has 26 children (for lowercase letters)
  • Space-time tradeoff: uses more space for faster queries
  • isEnd flag marks complete words
  • Useful for dictionary operations and string matching