Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History

README.md

Outline

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.