VIVID CODE / ARTICLES
38 articles
Fibonacci Heap: Delay the Cleanup
A practical explanation of Fibonacci heaps, including root lists, lazy meld, cascading cuts, degree consolidation, and amortized complexity.
Read articleLeftist Heap: A Heap Born to Merge
Learn how leftist heaps preserve heap order while using the leftist property and right-spine merging to make meld operations efficient.
Read articlePairing Heap: A Priority Queue Driven by Meld
A practical explanation of pairing heaps, including multiway heap order, constant-time meld, insertion, extract-min, two-pass pairing, amortized complexity, implementation details, and comparisons with binary heaps and binary search trees.
Read articleBinary Heap: The Engine Behind Priority Queues
Learn how the heap property, complete binary-tree structure, array representation, sift-up, and sift-down support efficient priority queues and task scheduling.
Read articleBinomial Heaps: Merging Like Binary Addition
A practical guide to binomial heap structure and the insert, merge, and extract-min operations built from binomial tree merging.
Read articleRope: The String Built for Editing
A practical guide to rope strings, including their tree structure, weight-based indexing, traversal, concatenation, splitting, and text insertion.
Read articleB+ Tree: The Real Database Index
A practical explanation of how B+ Trees differ from B-Trees, why data is stored only in leaves, how linked leaves support ordered range queries, and why databases favor this structure for indexing.
Read articleB-Tree: The Foundation of Database Indexing
A practical explanation of how B-Trees organize sorted keys, guide searches, handle insertion, split full nodes, and preserve balance—showing why databases use B-Trees as a foundation for indexing.
Read articleBinary Search Tree: The Art of Ordered Storage
A practical guide to binary search trees, covering their ordering invariant, search, insertion, deletion, in-order traversal, height-based complexity, and the O(n) degeneration caused by inserting already ordered values.
Read articleFenwick Tree: Ranking on a Game Leaderboard
Learn how a Fenwick tree uses lowbit to maintain leaderboard score counts, answer prefix-sum ranking queries, and apply point updates in O(log n) time.
Read articleSegment Tree: Computing HP on the Battlefield
Uses range-sum and point-update operations on unit HP in a game to explain how a segment tree supports both operations in O(log n).
Read articleRed-Black Tree: Balance Through Color
A practical explanation of how five color and path properties, recoloring, and rotations keep a Red-Black tree approximately balanced during insertion and deletion.
Read article