Datastructure | Python Implementations |
Disk-based, memory-based, or mmap-based? |
Implementation Language(s) |
Cython? |
Treap | treap.py | Memory-based | CPython 2, CPython 3, Pypy, Jython - any at your option | Yes, but optional |
Splay Tree | splay_mod | Memory-based | CPython 2, CPython 3, Pypy, Jython - any at your option | No |
Skip List | IndexableSkiplist | Memory-based | CPython 2.[56], CPython 3.1, others? | No |
Red-Black Tree | RBTree.py (red-black tree) | Memory-based | CPython 2.[567], Pypy, Jython | No |
AA Tree | aatree | Memory-based | CPython 2, CPython 3 only (?) | Requires Cython |
AVL Tree | bintrees | Memory-based | CPython 2.x, CPython 3.x | Yes, but optional |
2-3 Tree | 2-3 tree | Memory-based | Likely CPython 2.x, CPython 3.x, Pypy, Jython - but no test suite | No |
B Tree | Larch | Memory-based or Disk-based, at your option | Python | No |
B Tree | btree.BTree | Memory-based | Python | No |
B+ Tree | btree.BPlusTree | Memory-based | Python | No |
B+ Tree | sorteddict | Memory-based | Python | No |
B+ Tree | SQLite3 | Memory-based or Disk-based, at your option | C | No (?) |
B+ Tree | mxBeeBase | Disk-based | Needs Python and C | No |
Binary Heap | heapq | Memory-based | CPython 2.x, CPython 3.x, Pypy, Jython | Possible C extension module |
Binomial Heap | Binomial Queues (Python recipe) | Memory-based | Python | No |
Fibonacci Heap | Alistair Rendell's | Memory-based | Python | No |
Pairing Heap | Two pass variant | Memory-based | Python | No |