Trie Python

Autocompletion trie searches for items in the data structure and returns true if found.

Cases:

There are some interesting cases like the and the and these which must be accounted for using a node which tells us this is the eding of a word. Otherwise, inserting these will make it seem like the is a word in the data structure.

                   root
                /   \    \
                t   a     b
                |   |     |
                h   p     i
                |   |     |
                o   p     t
             /  |   |
             s  u   l
             |  |   |
             e  g   e
                |   
                h   
                |
                t

Run it yourself: https://github.com/kicksent/triePython


2020

Back to top ↑

2019

ASCII Otter

less than 1 minute read

Enjoy this otter ascii art.

Back to top ↑