Skip to content

Instantly share code, notes, and snippets.

View SimonCqk's full-sized avatar
🎯
Focusing

Simon_CQK SimonCqk

🎯
Focusing
View GitHub Profile
@SimonCqk
SimonCqk / btree.py
Last active March 22, 2023 05:47 — forked from teepark/btree.py
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