Indexing
Hashing your keys…
Initializing Sorting Algorithms...
Sorting
Trees
Graphs
Preparing interactive visualizations...
Indexing
Hashing your keys…
Every fast lookup is an index underneath. Watch hash tables absorb collisions and B-trees split their way to a shallow, balanced shape.
The baseline every index is measured against — scan every element, or halve the range each comparison.
O(n) / O(log n)O(1)Scan / HalvingOrdered nodes that give O(log n) lookups when balanced — and O(n) when they are not.
O(log n) avgO(n)Tree TraversalThe first self-balancing BST: rotations keep height logarithmic no matter the insertion order.
O(log n)O(n)RotationsBalance by colouring rather than strict height, trading slightly taller trees for cheaper inserts.
O(log n)O(n)Recolour / RotateSelf-adjusting tree that rotates every accessed node to the root, making hot keys progressively cheaper.
O(log n) amortisedO(n)SplayingSeparate chaining: every slot holds a list, so collisions extend a chain instead of hunting for space.
O(1) avgO(n)Separate ChainingOpen addressing: every key lives in the table itself, probing forward until it finds a free slot.
O(1) avgO(n)Open AddressingEach slot is a small fixed bucket — fewer probes, better cache behaviour, and an overflow area when a bucket fills.
O(1) avgO(n)Bucketed ProbingKeys become paths of characters, so lookup costs the length of the key rather than the size of the set.
O(m)O(n×m)Prefix PathA trie with single-child chains collapsed into one edge, cutting the node count on sparse key sets.
O(m)O(n)Path CompressionA trie-BST hybrid: three children per node instead of one per alphabet symbol, trading speed for memory.
O(log n + m)O(n)Three-way BranchWide nodes that keep the tree shallow, splitting and promoting keys upward so every leaf stays the same depth.
O(log n)O(n)Split / PromoteThe database index: all values live in linked leaves, so range scans walk sideways instead of back up the tree.
O(log n)O(n)Linked LeavesA B+ tree sits under almost every primary key you have ever queried. Knowing its shape explains why some queries are instant and others crawl.
Hash tables average constant time only while the load factor stays low and the hash spreads keys evenly. Watching collisions pile up shows where that promise breaks.
B-trees exist because reading a block costs the same as reading a byte. Wide, shallow trees are what you build when the bottleneck is I/O, not comparisons.