Simulators
Every demo from the lessons, full size. Drive one, finish its missions, then read the lesson behind it.
- Data Structures · Arrays and StringsInsert, delete and readChange the array and count how many values move.
- Data Structures · Linked ListsFollow the pointersInsert at the head and at the tail, then search. Watch how far each operation walks.
- Data Structures · Stacks and QueuesLast in or first in?Push and enqueue the same values, then remove one from each side.
- Data Structures · Hash TablesHash a key into a bucketType a key to see the hash arithmetic and the bucket it lands in.
- Data Structures · Binary Search TreesBuild and search a treeInsert values and search for them. Then try sorted inserts to see the tree degrade.
- Data Structures · Heaps and Priority QueuesPush, pop and watch the siftOne min-heap, shown as a tree and as an array. Every push and pop is a short walk along one path.
- Data Structures · Tries (Prefix Trees)Walk the shared pathInsert words, then search for a word or a prefix. Watch which nodes are shared and where each walk stops.
- Algorithms · Big OGrowth rates side by sideChange n and compare how many steps each shape needs.
- Algorithms · Binary SearchHalve the search rangeStep through each comparison. Grey values are ruled out.
- Algorithms · SortingWatch a sort runPick an algorithm and step through every compare and swap. Highlighted bars are being compared.
- Algorithms · Graph TraversalBreadth-first vs depth-firstSame grid, same start and goal. The only change is a queue versus a stack.
- Algorithms · Dynamic ProgrammingFill the tableStep through the table one cell at a time. Gold cells are the earlier answers the new cell reads.
- Interview Patterns · Two PointersSqueeze from both endsWatch L and R close in on the target. Every grey value is ruled out for good.
- Interview Patterns · Sliding WindowSlide the windowEach slide adds the value that enters and subtracts the one that leaves.
- Interview Patterns · Fast and Slow PointersFast and slow pointersSlow steps one node, fast steps two. On a loop they must meet; on a plain list fast falls off the end.
- Interview Patterns · Prefix SumsBuild once, ask in O(1)Build the running totals, then answer a range sum with one subtraction.