Coding Drills Offline

Mastery tree

Five branches leave a shared core. A path ends in a checkpoint, and a fork splits before it.

How progress is decided

Placeholder: a keep or rewrite drill counts toward the skill its mapping names, or toward a skill chosen by list order when it names none. A skill is mastered while the latest first-try-of-the-day answer on every paired drill was right, so a later miss drops it back to practicing. Exam and retired drills do not count, and a skill with no paired drill stays not started.

An exam stays locked until every skill it lists is mastered, including skills from other paths that lead into it. A sitting is 5 exam items. It passes when at most 1 is wrong on the first try and every kind of item the checkpoint requires was answered right.

Role-specific topics on the roadmap are not in this map yet. Nothing here changes the drills.

  • Not started
  • Practicing
  • Mastered
  • Locked exam
  • Available exam
  • Passed exam

Foundations

Shared index, name, and cost skills that the other branches build on.

Arrays and strings

Read an index, trace a scan with one or two pointers, and read a slice.

Starts here

Names and objects

Follow a reference, tell assignment from mutation, and predict shared state.

After

Problem-solving routine

Restate the output, pick a counterexample, and trace a brute-force solution.

After

Growth rates

Count operations, compare how the counts grow, name the growth in Big-O, and account for allocated output.

After

Operation costs

Price one operation, add sequential phases, and multiply a repeated cost.

After

Basic set, dictionary, and queue operations apply where an exercise uses them. They are not a separate path yet.

Hidden work

Spot a hidden scan or copy, count how often it runs, and combine the costs.

After

Recursive calls gate the slicing recursion. Names and objects brings list `+=` in place and a second name for one list.

Bit manipulation

Apply the bit operators to ints, clear the lowest set bit, and use an int as a set of flags.

After

Growth rates brings pass counting (one pass per set bit) and the 2 ** n subset count.

Search, hashes, ordering, intervals, and windows over a sequence.

Pointer scans

Choose which end moves, keep indices distinct, and handle repeats.

After

The scans from both ends assume a sorted input. They do not need the Sort order path.

Fork · Compaction

Palindromes

Compare mirrored characters, allow one deletion, and grow a palindrome from its center.

After

Sort order

Read a sort key, handle ties, and tell an in-place sort from a returned one.

After

The in-place cards and the alias items turn on two names sharing one list, which Names and objects teaches.

Interval merging

Draw endpoints, apply the touching rule, and extend the running end.

After

Event sweeps

Turn endpoints into events, order ties, and track the active count.

After

Hash lookups

Read a set or dictionary, pick a key, and track what has been seen.

After

Operation costs prices a set or dict key test.

Prefix counts

Build a prefix sum list, subtract two entries to sum a subarray, and count earlier matches.

After

Variable windows

Update a fixed window, move its bounds, and restore validity before recording.

After

Window limits

See when shrinking a window by its total is safe, and when a negative value breaks it.

After

Prefix counts is for comparing methods.

Feasible limits

Test one limit, find the false-to-true change, and shrink the answer range.

After

Boundary search is for the half-open loop, and clearing it, the rotated fork included, is part of the gate. Greedy choices is for packing. Operation costs is for the scan cost.

Data structures

Stacks, heaps, and linked lists, from one operation up to a combined use.

Stack matching

Push and pop the latest item, match a closer, and read the stack that remains.

After

Monotonic stack

Keep waiting positions, resolve smaller tops, and account for the whole run.

After

Index versus value is the arrays skill for reading an index. Growth rates is for the cost.

Priority order

Tell a FIFO queue from a priority queue, find the heap root, and predict one push or pop.

After

Heap operations

Trace one sift and compare ways to build a heap. Ties are a separate fork.

After

Tuple ordering for ties is named in the plan and is not a path of its own. The tie fork covers that comparison.

Fork · Ties

Bounded heaps

Evict to keep a size limit. Merging sorted streams is a separate fork.

After

Fork · Merge

Pointer walks

Advance one or two hops, hold a gap or a speed, and stop cleanly.

After

Trees and graphs

Reachability, layers, connectivity, orderings, weights, and tree structure.

Reachability

Find legal neighbors, mark a cell when it is discovered, and finish one region.

After

The plan also names FIFO and LIFO operations. Those are not separate paths; stack matching and priority order teach them.

Traversal layers

Trace one queue layer, label unit distances, and start from several sources.

After

FIFO is named as well and is not a separate path. Priority order introduces FIFO versus priority.

Connectivity

Read an adjacency list and separate components. Linking sets over time is a fork.

After

Fork · Dynamic links

Dependency order

Read a directed prerequisite, count incoming edges, and unlock a successor.

After

FIFO is named as well and is not a separate path.

Weighted paths

Sum edge weights, relax one edge, and see when a distance can be finalized.

After

Tree walks

Name the parts of a tree, trace a visit order, and tell height from node count.

After

FIFO for level order is named as well and is not a separate path.

BST order

Choose an ordered subtree, inherit an ancestor bound, and find where two targets split.

After

Tree summaries

Use child heights, tell a returned height from a path through the node, and keep the best path.

After

Problem-solving patterns

Recursion, search, repeated subproblems, tables, greedy rules, and choosing a method.

Recursive calls

Name a stopping case, trace a smaller call, and follow what it returns.

After

Search state

Make a choice, undo it before the next sibling, and snapshot a finished path.

After

Repeated states

Name a subproblem, recognize the same inputs, and reuse a cached result.

After

One-dimensional tables

Say what an entry means, initialize the empty cases, and choose a predecessor.

After

Grid tables

Find incoming neighbors, initialize edges and obstacles, and fill one interior cell.

After

Grid coordinates are named as well and are not a separate path. Arrays and strings covers indexes.

Subsequence tables

Tell a subsequence from a substring, read two prefix indexes, and choose a transition.

After

String indexes are named as well and are not a separate path.

DP storage

Keep the past entries still needed, update old and new values in order, and count the work.

After

Grid tables is for rolling rows.

Greedy choices

Name a local rule, try a small counterexample, and state the assumption that makes it safe.

After

Greedy scheduling

Pick a compatible interval, compare the room each choice leaves, and finish earliest.

After

Method selection

Name the constraint that decides the method, contrast two techniques, and justify one.

After

Waits on every candidate method its drills compare, so review and the exam never test a technique the learner has not reached.