Created
December 2, 2017 17:54
-
-
Save osori/04a960d9f2ca38ed0670de36743eec63 to your computer and use it in GitHub Desktop.
Trie Node implementation in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node(object): | |
""" | |
A node that consists of a trie. | |
""" | |
def __init__(self, key, data=None): | |
self.key = key | |
self.data = data | |
self.children = {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment