Book X
Coding interview practice
A visual-first coding field guide for data structures, algorithms, and practical AI coding. Learn each problem by seeing the state it preserves, the move it makes, and the invariant that makes the move safe.
11 chapters · 107 entriesChapters
11Learn by rebuilding
Use cues, state, invariants, and spaced rebuilding to turn unfamiliar prompts into recognizable mental models.
Remember the past
Use maps, sets, and saved boundary values to turn repeated searching into one pass.
Move boundaries
Use sorted order, windows, and answer-space search to discard impossible regions safely.
Keep unfinished work
Use stacks and monotonic state when the newest unresolved item must be handled first.
Process the next best item
Let queues, heaps, and shortest-path frontiers decide which reachable item comes next.
Explore choices
Traverse graphs, trees, choice paths, and smaller dynamic-programming states without losing the invariant.
Create a useful order
Sort ranges, commit safe greedy choices, remove prerequisites, and join connected groups.
Change links
Rewire linked lists and prefix trees while preserving the pointer or path you still need.
Complete core coverage
Reuse the main patterns across bits, strings, matrices, trees, graphs, intervals, and caches.
Practical AI coding
Make array shapes, masks, numerical stability, batching, selection, and metrics visible before coding.
Hard problems
Combine boundaries, stacks, trees, grids, tries, heaps, and answer search after the core patterns feel natural.