TrieSuite

One data structure. Four real-world applications.

Trie Aho-Corasick Binary Trie Β· LPM Segment Trie Python Β· DSA Project
πŸ”€

Trie Autocomplete Engine

Prefix search O(L+K) Β· Levenshtein fuzzy search Β· 160-word dictionary

Search

Fuzzy OFF Edit distance ≀ 1
160 words loaded Β· real-time
HOW IT WORKS
Trie traverses character-by-character to the prefix node, then collects all words in that subtree via DFS. O(L + K) vs. list scan O(nΒ·L).

Suggestions

Start typing on the left…
🧬

DNA Pattern Matching β€” Aho-Corasick

Multi-pattern search in O(n+m) Β· single pass Β· failure links

Input

Highlighted Sequence

Hit Run to see results…

Match Table

🌐

IP Routing β€” Binary Trie (Longest Prefix Match)

O(32) = O(1) lookup Β· same algorithm as real routers Β· CIDR support

Routing Table

Add Route

IP Lookup

HOW IT WORKS
IPv4 = 32 bits β†’ binary Trie depth 32. Walk bits left-to-right, track the last node with a route. The deepest match wins β€” this is Longest Prefix Match, used in every real router.
πŸ”—

URL Routing β€” Segment Trie with Wildcards

:param wildcards Β· exact > wildcard priority Β· O(D) match

Registered Routes

    Add Route

    Route Matcher

    TRY THESE
    /home
    /user/42
    /user/42/posts
    /user/99/posts/15
    /shop/electronics
    /shop/books/python-dsa