/Trie

Trie implementation in C#

Primary LanguageC#

Trie

Trie (Prefix Tree) implementation in C# with insert, search, and startsWith methods.

  • insert: O(n) complexity (size of the inserted word)
  • search: O(n) complexity (size of the word)
  • startsWith: O(n) complexity (size of the prefix)

All operation has a Linear time, the height of trie equal to the longest word size in the Trie