Skip to content

Instantly share code, notes, and snippets.

View lawrentiy's full-sized avatar
🏠
Working from home

Pavel lawrentiy

🏠
Working from home
View GitHub Profile
@teepark
teepark / btree.py
Created September 9, 2010 22:45
a pure-python B tree and B+ tree implementation
import bisect
import itertools
import operator
class _BNode(object):
__slots__ = ["tree", "contents", "children"]
def __init__(self, tree, contents=None, children=None):
self.tree = tree