Skip to content

Instantly share code, notes, and snippets.

@maheshakya
maheshakya / SimplePrefixTree.py
Created April 8, 2014 12:31
Implements a simple prefix tree. This has a function which accepts an array of values and returns matching indices of that array for a query.
# a: array of hashes
# h: number of hash bits to be considered
import numpy as np
class Node():
""""
Defines a node in the prefix tree
"""
def __init__(self, value):
self.children = list()