Skip to content

Instantly share code, notes, and snippets.

View mozey's full-sized avatar
🇿🇦

Christiaan B van Zyl mozey

🇿🇦
View GitHub Profile
@mozey
mozey / trie.py
Last active June 2, 2017 12:41 — forked from nickstanisha/trie.py
An object-oriented implementation of a "Trie" in Python
# An object-oriented implementation of a "Trie" in Python
# https://gist.github.com/mozey/2604f7ac08226f774bbc2fab57f0c67e
class Node:
def __init__(self, label=None, data=None):
self.label = label
self.data = data
self.children = dict()