Problems
Each problem is the last step of a short ladder. Its building blocks are moves you can name; when every block is in place, the problem is those moves assembled. If one feels impossible, the missing block is listed here.
- 0
- of 52 solved
- 0
- ready to attempt
- —
- target conversion: none attempted yet
1 Hashing· 0 of 5 solved
- 0 of 2 blocks ready2 reps to go
Show the 2 building blocksBuilding blocks
- dictionary ladder (not yet)1 rep
- the lead-in reps (not yet)1 rep
Skills still thinfrequency mapdict.getstring iteration
- 0 of 3 blocks ready12 reps to go
Show the 3 building blocksBuilding blocks
- index maps (not yet)5 reps
- complements (not yet)5 reps
- the lead-in reps (not yet)2 reps
Skills still thinenumerateindex mapdict membership
- 0 of 3 blocks ready4 reps to go
Show the 3 building blocksBuilding blocks
- collect items under a key in a dict of lists (not yet)1 rep
- turn each item into a key a dict accepts (not yet)2 reps
- group by a computed key and hand back the groups (not yet)1 rep
Skills still thindict membershiplist.appendsorted / .sort
- 0 of 4 blocks ready6 reps to go
Show the 4 building blocksBuilding blocks
- put the numbers in a set (not yet)1 rep
- extend a run and measure it (not yet)2 reps
- spot where a run starts (not yet)1 rep
- only count from starts (not yet)2 reps
Skills still thinset creationset membershipwhile loop
- 0 of 4 blocks ready6 reps to go
Show the 4 building blocksBuilding blocks
- carry a running total through a scan (not yet)1 rep
- record what came before each position (not yet)2 reps
- walk from the right for what comes after (not yet)1 rep
- combine both sides without overwriting (not yet)2 reps
Skills still thinaccumulator variablelist indexingrange()
2 Strings + two pointers· 0 of 5 solved
- 0 of 6 blocks ready28 reps to go
Show the 6 building blocksBuilding blocks
- strings (not yet)5 reps
- slicing (not yet)5 reps
- string methods (not yet)4 reps
- two pointers (not yet)4 reps
- move one pointer (not yet)5 reps
- running min/max (not yet)5 reps
Skills still thintwo pointerspointer updatesstring indexing
- 0 of 1 blocks ready5 reps to go
Show the 1 building blocksBuilding blocks
- running min/max (not yet)5 reps
Skills still thinrunning statelist iterationaccumulator variable
- 0 of 1 blocks ready5 reps to go
Show the 1 building blocksBuilding blocks
- running min/max (not yet)5 reps
Skills still thintwo pointerspointer updateswhile loop
- 0 of 4 blocks ready6 reps to go
Show the 4 building blocksBuilding blocks
- start at both ends and walk inward (not yet)2 reps
- measure the area between two indexes (not yet)1 rep
- move the shorter side (not yet)1 rep
- track the best area seen (not yet)2 reps
Skills still thintwo pointerspointer updatesrunning state
- 0 of 5 blocks ready7 reps to go
Show the 5 building blocksBuilding blocks
- sort, fix one index and pair-search the rest (not yet)2 reps
- step past equal neighbours (not yet)2 reps
- skip a repeated fixed value safely (not yet)1 rep
- skip repeats after a hit (not yet)1 rep
- count each triple once (not yet)1 rep
Skills still thinsorted / .sorttwo pointerspointer updates
3 Sliding window· 0 of 2 solved
- 0 of 2 blocks ready12 reps to go
Show the 2 building blocksBuilding blocks
- windows (not yet)6 reps
- window state (not yet)6 reps
Skills still thinsliding windowwindow stateset membership
- 0 of 4 blocks ready7 reps to go
Show the 4 building blocksBuilding blocks
- grow and shrink a window that carries a count map (not yet)2 reps
- work out how many letters would have to change (not yet)2 reps
- keep the counts true as the window slides (not yet)2 reps
- shrink while too many changes are needed (not yet)1 rep
Skills still thinsliding windowwindow statefrequency map
4 Stacks· 0 of 1 solved
- 0 of 2 blocks ready12 reps to go
Show the 2 building blocksBuilding blocks
- stacks (not yet)6 reps
- matching pairs (not yet)6 reps
Skills still thinstack append/popmatching pairsdict lookup
5 Binary search· 0 of 2 solved
- 0 of 3 blocks ready16 reps to go
Show the 3 building blocksBuilding blocks
- while + indexes (not yet)3 reps
- binary search (not yet)6 reps
- search variants (not yet)7 reps
Skills still thinbinary searchmid calculationsearch invariant
- 0 of 4 blocks ready7 reps to go
Show the 4 building blocksBuilding blocks
- halve a range with lo, mid and hi (not yet)2 reps
- keep mid in range and loop while lo < hi (not yet)1 rep
- compare the middle with the right end (not yet)2 reps
- close in on the smallest value (not yet)2 reps
Skills still thinbinary searchmid calculationsearch invariant
6 Linked lists· 0 of 4 solved
- 0 of 2 blocks ready11 reps to go
Show the 2 building blocksBuilding blocks
- listnode + traversal (not yet)5 reps
- pointer rewiring (not yet)6 reps
Skills still thinlinked list traversalpointer reassignmentListNode
- 0 of 1 blocks ready5 reps to go
Show the 1 building blocksBuilding blocks
- dummy head (not yet)5 reps
Skills still thindummy headlinked list traversalpointer reassignment
- 0 of 4 blocks ready5 reps to go
Show the 4 building blocksBuilding blocks
- walk a list node by node (not yet)2 reps
- move two pointers at different speeds (not yet)1 rep
- compare the pointers after they move (not yet)1 rep
- tell a loop from an ending (not yet)1 rep
Skills still thinlinked list traversalwhile loopfast & slow pointers
- 0 of 4 blocks ready4 reps to go
Show the 4 building blocksBuilding blocks
- give one pointer a head start of k (not yet)1 rep
- put a dummy in front of the head (not yet)1 rep
- stop one node before the target (not yet)1 rep
- rewire at the landing spot (not yet)1 rep
Skills still thinlinked list traversalpointer reassignmentdummy head
7 Recursion + trees· 0 of 7 solved
- 0 of 4 blocks ready18 reps to go
Show the 4 building blocksBuilding blocks
- functions (not yet)3 reps
- recursion (not yet)5 reps
- treenode (not yet)3 reps
- tree dfs (not yet)7 reps
Skills still thintree DFSbase caserecursive return
- 0 of 1 blocks ready5 reps to go
Show the 1 building blocksBuilding blocks
- two trees at once (not yet)5 reps
Skills still thintree DFSbase caserecursive return
- 0 of 1 blocks ready4 reps to go
Show the 1 building blocksBuilding blocks
- changing trees (not yet)4 reps
- 0 of 4 blocks ready6 reps to go
Show the 4 building blocksBuilding blocks
- compare two trees node by node (not yet)2 reps
- visit every node and combine the answers (not yet)1 rep
- ask the helper at every node (not yet)2 reps
- handle the empty cases and stop at the first match (not yet)1 rep
Skills still thintree DFSbase caserecursive return
- 0 of 4 blocks ready5 reps to go
Show the 4 building blocksBuilding blocks
- search an unsorted tree everywhere (not yet)1 rep
- walk a search tree one way (not yet)1 rep
- remember a candidate while walking (not yet)1 rep
- find where two values part ways (not yet)2 reps
Skills still thinTreeNodewhile loopBST ordering
- 0 of 4 blocks ready6 reps to go
Show the 4 building blocksBuilding blocks
- check every node and combine with and (not yet)2 reps
- pass bounds down the tree (not yet)1 rep
- tighten one bound at each step (not yet)1 rep
- check each node against every ancestor (not yet)2 reps
Skills still thintree DFSrecursive returnBST ordering
- 0 of 4 blocks ready5 reps to go
Show the 4 building blocksBuilding blocks
- visit left, node, right (not yet)1 rep
- read a search tree in sorted order (not yet)2 reps
- count visits in a shared counter (not yet)1 rep
- stop as soon as the count is reached (not yet)1 rep
Skills still thintree DFSBST orderingin-order traversal
8 Tries· 0 of 2 solved
- 0 of 4 blocks ready7 reps to go
Show the 4 building blocksBuilding blocks
- make a node with children and an end flag (not yet)2 reps
- insert a word letter by letter (not yet)2 reps
- tell a whole word from a prefix (not yet)2 reps
- keep the root inside a class (not yet)2 reps
Skills still thintrie node & inserttrie search & prefixesdict membership
- 0 of 4 blocks ready5 reps to go
Show the 4 building blocksBuilding blocks
- store words in a trie inside a class (not yet)1 rep
- search recursively, one position per call (not yet)1 rep
- try every child on a wildcard (not yet)2 reps
- mix exact letters with wildcards (not yet)1 rep
Skills still thintrie node & inserttrie search & prefixestrie search with a wildcard
9 BFS + grids· 0 of 2 solved
- 0 of 2 blocks ready9 reps to go
Show the 2 building blocksBuilding blocks
- deque (not yet)4 reps
- bfs by level (not yet)5 reps
Skills still thinBFSBFS by levelcollections.deque
- 0 of 4 blocks ready17 reps to go
Show the 4 building blocksBuilding blocks
- grids (not yet)4 reps
- neighbors (not yet)5 reps
- grid bfs (not yet)6 reps
- the lead-in reps (not yet)2 reps
Skills still thinnested lists / gridsneighbors & boundsvisited set
10 Graphs· 0 of 3 solved
- 0 of 6 blocks ready27 reps to go
Show the 6 building blocksBuilding blocks
- adjacency lists (not yet)5 reps
- graph dfs (not yet)6 reps
- graph bfs (not yet)5 reps
- path exists (not yet)2 reps
- components (not yet)3 reps
- directed cycles (not yet)6 reps
Skills still thincycle detectionadjacency listgraph DFS
- 0 of 4 blocks ready7 reps to go
Show the 4 building blocksBuilding blocks
- walk a graph without going round in circles (not yet)2 reps
- give every node a fresh neighbour list (not yet)1 rep
- map each original to its copy (not yet)2 reps
- register the copy before recursing (not yet)2 reps
Skills still thingraph DFSvisited setdict membership
- 0 of 5 blocks ready6 reps to go
Show the 5 building blocksBuilding blocks
- build the adjacency list from edges (not yet)1 rep
- walk one whole group (not yet)2 reps
- start a walk from each unvisited node (not yet)1 rep
- give nodes with no edges a key (not yet)1 rep
- count or measure the groups (not yet)1 rep
Skills still thinadjacency listgraph DFSvisited set
11 Sorting + heaps· 0 of 2 solved
- 0 of 6 blocks ready27 reps to go
Show the 6 building blocksBuilding blocks
- sorting (not yet)6 reps
- sort keys (not yet)5 reps
- frequency + sort (not yet)4 reps
- heapq (not yet)4 reps
- max-heap (not yet)3 reps
- top-k (not yet)5 reps
Skills still thinheapq push/poptop-k with a heap
- 0 of 1 blocks ready5 reps to go
Show the 1 building blocksBuilding blocks
- top-k (not yet)5 reps
Skills still thinfrequency mapheapq push/poptop-k with a heap
12 Intervals· 0 of 4 solved
- 0 of 1 blocks ready6 reps to go
Show the 1 building blocksBuilding blocks
- intervals (not yet)6 reps
Skills still thincustom sort keysinterval overlaplist indexing
- 0 of 4 blocks ready6 reps to go
Show the 4 building blocksBuilding blocks
- merge overlapping intervals (not yet)2 reps
- tell before, overlapping and after apart (not yet)1 rep
- widen the new interval over every overlap (not yet)2 reps
- run the three phases in order (not yet)1 rep
Skills still thininterval overlapwhile loopthree-phase interval scan
- 0 of 4 blocks ready4 reps to go
Show the 4 building blocksBuilding blocks
- sort the intervals by start (not yet)1 rep
- compare each start with the previous end (not yet)1 rep
- stop at the first clash (not yet)1 rep
- check a whole schedule (not yet)1 rep
Skills still thincustom sort keysinterval overlap
- 0 of 5 blocks ready8 reps to go
Show the 5 building blocksBuilding blocks
- push and pop a min-heap (not yet)2 reps
- sort the meetings by start (not yet)1 rep
- reuse the earliest-ending room or open a new one (not yet)2 reps
- read the answer from the heap size (not yet)2 reps
- count the rooms for a whole schedule (not yet)1 rep
Skills still thinsorted / .sortheapq push/popinterval overlap
13 Backtracking· 0 of 2 solved
- 0 of 3 blocks ready14 reps to go
Show the 3 building blocksBuilding blocks
- decision trees (not yet)5 reps
- path state (not yet)6 reps
- the lead-in reps (not yet)3 reps
Skills still thinbacktracking statebase case
- 0 of 5 blocks ready9 reps to go
Show the 5 building blocksBuilding blocks
- choose, recurse and un-choose with one path (not yet)2 reps
- keep picks from going backwards with a start index (not yet)2 reps
- pass i to reuse a number, i + 1 to use it once (not yet)2 reps
- carry the remaining total and stop below zero (not yet)1 rep
- list each combination once, whatever the order (not yet)2 reps
Skills still thinbacktracking statebase casestart index & reuse
14 Dynamic programming· 0 of 9 solved
- 0 of 3 blocks ready15 reps to go
Show the 3 building blocksBuilding blocks
- recurrences (not yet)4 reps
- memoization (not yet)6 reps
- bottom-up dp (not yet)5 reps
Skills still thinrecurrence reasoningmemoizationbottom-up DP
- 0 of 1 blocks ready5 reps to go
Show the 1 building blocksBuilding blocks
- rolling state (not yet)5 reps
Skills still thinrecurrence reasoningbottom-up DPrunning state
- 0 of 4 blocks ready5 reps to go
Show the 4 building blocksBuilding blocks
- take or skip along a straight row (not yet)2 reps
- cut the ring into two lines (not yet)1 rep
- answer a ring of one before splitting (not yet)1 rep
- solve both lines and keep the better (not yet)1 rep
Skills still thinbottom-up DPrecurrence reasoningrunning state
- 0 of 4 blocks ready6 reps to go
Show the 4 building blocksBuilding blocks
- carry a best-so-far through one pass (not yet)2 reps
- extend the run or start fresh (not yet)2 reps
- start from the first value, not from zero (not yet)1 rep
- track the best run ending anywhere (not yet)1 rep
Skills still thinrunning stateaccumulator variablebest ending here
- 0 of 3 blocks ready4 reps to go
Show the 3 building blocksBuilding blocks
- keep one running best in a single pass (not yet)1 rep
- push the farthest reach forward (not yet)1 rep
- stop when the scan passes the reach (not yet)2 reps
Skills still thinenumeraterunning stateearly return
- 0 of 5 blocks ready7 reps to go
Show the 5 building blocksBuilding blocks
- fill a table from smaller amounts (not yet)2 reps
- mark which amounts can be made (not yet)1 rep
- keep the fewest over every choice (not yet)2 reps
- let infinity stand for cannot (not yet)1 rep
- turn infinity into -1 at the end (not yet)1 rep
Skills still thinbottom-up DPrecurrence reasoningrange()
- 0 of 5 blocks ready6 reps to go
Show the 5 building blocksBuilding blocks
- fill a table from earlier entries (not yet)1 rep
- test the last piece against the word set (not yet)1 rep
- fill a table over prefix lengths (not yet)2 reps
- mark the empty prefix as done (not yet)1 rep
- join an earlier split to one last piece (not yet)1 rep
Skills still thinbottom-up DPslicingset membership
- 0 of 3 blocks ready5 reps to go
Show the 3 building blocksBuilding blocks
- define each entry as the best ending at that index (not yet)1 rep
- look back at every earlier index that fits (not yet)2 reps
- answer with the best entry, not the last (not yet)2 reps
Skills still thinbottom-up DPrecurrence reasoningrange()
- 0 of 4 blocks ready6 reps to go
Show the 4 building blocksBuilding blocks
- count routes from the cell above and the cell to the left (not yet)2 reps
- build a table of separate rows (not yet)2 reps
- fill each cell from above and left (not yet)1 rep
- fill the edges first, then the inside (not yet)1 rep
Skills still thinrecurrence reasoningnested lists / gridsbottom-up DP
15 Matrix· 0 of 2 solved
- 0 of 3 blocks ready6 reps to go
Show the 3 building blocksBuilding blocks
- transpose a square matrix in place (not yet)2 reps
- reverse each row, or the order of the rows (not yet)2 reps
- see a quarter turn as two flips (not yet)2 reps
Skills still thinnested lists / gridstranspose & reverse in placerange()
- 0 of 4 blocks ready6 reps to go
Show the 4 building blocksBuilding blocks
- walk one edge between two bounds (not yet)2 reps
- guard a single remaining row or column (not yet)2 reps
- loop while the bounds have not crossed (not yet)1 rep
- chain the four walks, shrinking a bound after each (not yet)1 rep
Skills still thinnested lists / gridsrange()while loop
When you are ahead
These have their bridges ready but do not fit inside the 90 days at the plan’s pace. They are next in, most valuable first, whenever the gauge says you are ahead. Their bridge reps are in the day pages as extras.
- 0 of 5 blocks ready8 reps to go
Show the 5 building blocksBuilding blocks
- search an inclusive range for one value (not yet)2 reps
- compare the middle with an end of the range (not yet)2 reps
- tell which half is sorted (not yet)1 rep
- test whether the target lies inside the sorted half (not yet)2 reps
- search a rotated list for a target (not yet)1 rep
- 0 of 4 blocks ready5 reps to go
Show the 4 building blocksBuilding blocks
- collect the rows and columns to change, then change them (not yet)2 reps
- remember whether the first row and column need changing (not yet)1 rep
- read those two answers before writing any marks (not yet)1 rep
- use the first row and column as the marks (not yet)1 rep
- 0 of 4 blocks ready5 reps to go
Show the 4 building blocksBuilding blocks
- sort records by a chosen field (not yet)1 rep
- keep what starts after the last kept end (not yet)1 rep
- sort by end, not by start (not yet)2 reps
- turn the most kept into the fewest removed (not yet)1 rep
- 0 of 5 blocks ready7 reps to go
Show the 5 building blocksBuilding blocks
- step to the four neighbours and stay in bounds (not yet)2 reps
- check a cell: in bounds, right letter, not used (not yet)1 rep
- recurse from a cell for the next letter (not yet)1 rep
- mark the cell, try the neighbours, unmark it (not yet)2 reps
- try every cell as the start (not yet)1 rep
- 0 of 4 blocks ready6 reps to go
Show the 4 building blocksBuilding blocks
- compare two ends with two pointers (not yet)2 reps
- grow outward while the ends match (not yet)1 rep
- turn the stopped pointers into a slice (not yet)1 rep
- try an odd and an even center (not yet)2 reps
- 0 of 5 blocks ready6 reps to go
Show the 5 building blocksBuilding blocks
- weave two lists together (not yet)2 reps
- cut the list at its middle (not yet)1 rep
- reverse a list in place (not yet)1 rep
- cut, then weave, in place (not yet)1 rep
- cut, reverse, then walk both halves (not yet)1 rep
- 0 of 4 blocks ready5 reps to go
Show the 4 building blocksBuilding blocks
- build the adjacency list from edges (not yet)1 rep
- reach every node from node 0 (not yet)2 reps
- check the edge count and the reach together (not yet)1 rep
- count the edges a connected graph needs (not yet)1 rep
- 0 of 5 blocks ready7 reps to go
Show the 5 building blocksBuilding blocks
- fill a grid from above and left (not yet)2 reps
- pad the table by one row and one column (not yet)1 rep
- read each string one index behind the table (not yet)2 reps
- extend the diagonal on a match (not yet)1 rep
- carry the better neighbour on a mismatch (not yet)1 rep
- 0 of 5 blocks ready6 reps to go
Show the 5 building blocksBuilding blocks
- make a node and attach its subtrees (not yet)1 rep
- split the in-order list around the root (not yet)1 rep
- cut the pre-order list by the left size (not yet)2 reps
- build each side recursively and return the root (not yet)1 rep
- rebuild a tree from two traversals (not yet)1 rep
- 0 of 5 blocks ready7 reps to go
Show the 5 building blocksBuilding blocks
- walk a grid with a visited set (not yet)2 reps
- collect the cells on an edge (not yet)1 rep
- spread from many starts into one set (not yet)1 rep
- walk uphill from the edge (not yet)2 reps
- keep the cells both walks reached (not yet)1 rep
- 0 of 4 blocks ready5 reps to go
Show the 4 building blocksBuilding blocks
- see why a plain separator breaks (not yet)1 rep
- write each item as length, marker, text (not yet)1 rep
- read a length up to the marker, slice, advance (not yet)1 rep
- hop through the whole string item by item (not yet)2 reps
- 0 of 4 blocks ready5 reps to go
Show the 4 building blocksBuilding blocks
- merge two sorted lists (not yet)1 rep
- fold many lists into one (not yet)1 rep
- pair up neighbours for one round (not yet)1 rep
- repeat rounds until one list is left (not yet)2 reps
- 0 of 5 blocks ready7 reps to go
Show the 5 building blocksBuilding blocks
- return the height of a subtree (not yet)1 rep
- return one arm and record the bend (not yet)3 reps
- drop an arm that makes the sum worse (not yet)1 rep
- join two arms at one node (not yet)1 rep
- do both at every node in one pass (not yet)1 rep
- 0 of 6 blocks ready10 reps to go
Show the 6 building blocksBuilding blocks
- count what the target needs (not yet)2 reps
- check that a window covers every need (not yet)1 rep
- tally the needs met as characters enter and leave (not yet)3 reps
- shrink while the window is still valid (not yet)2 reps
- remember the smallest window found (not yet)1 rep
- grow until covered, then shrink and record (not yet)1 rep
- 0 of 5 blocks ready6 reps to go
Show the 5 building blocksBuilding blocks
- count the ways over prefix lengths (not yet)2 reps
- add the counts from one back and two back (not yet)1 rep
- judge a one- or two-digit piece (not yet)1 rep
- reject a piece with a leading zero (not yet)1 rep
- sum the ways from both piece sizes (not yet)1 rep