BST, Min/Max Heaps & Priority Queues
Master ordered tree structures and priority queues: BST invariant search/insert/delete, array-backed binary heaps (sift-up, sift-down), and Top-K streaming algorithms.
Binary tree structures and comparison semantics
Mastery of Binary Search Tree invariants, AVL rotations, Red-Black color rules, and Dual-Heap streaming median finding.
Read in order, or jump to what you need.
Every lesson builds on the one before it. Open any lesson to read the explanation, run the examples, and try the practice challenges.
- 13.01Binary Search Tree Operations: Validation, Search, Insert & Deletion4 min
Deconstruct Binary Search Trees (BST). Enforce the BST invariant, perform logarithmic search and insertion, and handle 3-case node deletion with In-Order Successors.
- 13.02Binary Heaps & Priority Queues: Sift-Up, Sift-Down & Top-K Streams4 min
Master heap data structures. Understand the Complete Binary Tree property, array-backed heap indexing, sift-up/sift-down mechanics, and solve Top-K Frequent Elements.
- 13.03Self-Balancing Trees: AVL Rotations and Red-Black Rebalancing Invariants4 min
Analyze the mathematics of self-balancing binary search trees: AVL height-balance factors, single and double rotations, and Red-Black coloring invariants.
- 13.04Dual-Heap Architectures: Continuous Median Finding and Top-K Streaming4 min
Architect high-performance streaming analytics using dual-heap balancing for continuous median calculation and bounded PriorityQueues for Top-K tracking.
Ready to move on?
Implement continuous median streaming and Top-K frequency tracking using PriorityQueues.
Open the module self-check