Skip to content

Instantly share code, notes, and snippets.

@osori
Created December 2, 2017 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osori/04a960d9f2ca38ed0670de36743eec63 to your computer and use it in GitHub Desktop.
Save osori/04a960d9f2ca38ed0670de36743eec63 to your computer and use it in GitHub Desktop.
Trie Node implementation in Python
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