Index

Module 03 · DSAWorked, and deeper

Trees, Worked (rotations, B-trees, range trees)

Rotations and Range Trees
Rotations and Range Trees · Open board

What it shows, before any of it is named: a small swap that straightens a leaning tree, two rulebooks for when to make that swap, the same swap’s cousin for a tree stored on disk, and one more tree built for a different question entirely.

Before you start. You need a binary search tree: a box holding one key, pointing at up to two others, smaller keys down the left and bigger down the right, so left-or-right at each step narrows the search. Trees (BST, balancing, heaps, tries) built that and asked you to trust that balance keeps it fast - this lesson is the proof, by hand.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Review DSA →

Saved in this browser, and to your account when you sign in.