Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 457 Bytes

File metadata and controls

19 lines (15 loc) · 457 Bytes

Trie (Prefix Tree)

Implementation of a Trie (Prefix Tree) data structure with support for:

  • Word search
  • Prefix verification
  • Basic autocomplete operations

Time Complexity

  • Insert: O(n)
  • Search: O(n)
  • StartsWith: O(n)

Where n is the length of the word or prefix.

Common Use Cases

This data structure is commonly used in:

  • Autocomplete systems (e.g. search bars)
  • Text search engines
  • Efficient indexing of terms and dictionaries