Coding Fluency Diagnostic
Arrays, Hashing & Ordered SearchRefresh compact state, boundary search, and answer-space search through composition rather than syntax drills.Core
Arrays, Hashing & Ordered Search
Why am I learning this?
Refresh compact state, boundary search, and answer-space search through composition rather than syntax drills.
Prerequisites
Start here - no required prerequisite.
Learn
- Prefix/suffix state
- Exact and boundary search
- Answer-space predicates
Recognize It When…
- Repeated lookup or aggregate state
- A monotonic boundary can eliminate candidates
Core Problems
3Not StartedProduct of Array Except SelfPrefix/suffix aggregationMediumCore
Builds two-direction aggregate reasoning without division.
Not StartedSearch in Rotated Sorted ArrayRotated binary searchMediumCore
Combines exact lookup with identifying the usable sorted half.
Mastery Check
- Explain the invariant and edge boundaries without a memorized template.
Trees & Recursive ContractsDefine what each call returns before touching traversal code.Core
Trees & Recursive Contracts
Why am I learning this?
Define what each call returns before touching traversal code.
Prerequisites
Start here - no required prerequisite.
Learn
- Recursive contracts
- Local versus global state
- Stack-depth risk
Recognize It When…
- A parent combines summaries returned by children
Core Problems
1Mastery Check
- State the downward-path return contract and the complete-path update separately.
Graph Modeling RefreshName vertices, edges, direction, weights, and the required graph operation first.Core
Graph Modeling Refresh
Why am I learning this?
Name vertices, edges, direction, weights, and the required graph operation first.
Prerequisites
Start here - no required prerequisite.
Learn
- Reachability
- Dependency ordering
- Weighted paths
Recognize It When…
- Relationships form an implicit or explicit network
Core Problems
3Not StartedNumber of IslandsConnected componentsMediumCore
The central grid-as-graph exercise for component counting.
Interview follow-ups
- How would BFS differ from DFS here?
- What changes if mutating the input is not allowed?
Not StartedCourse ScheduleTopological sort / cycle detectionMediumCore
The essential dependency-graph problem for detecting whether all work can be ordered.
Senior follow-ups 3
What if dependencies change after an ordering is computed?
How would you return the actual cycle instead of only false?
How could independent ready tasks be executed in parallel?
From Algorithm to Design
Where this appears in systems: dependency execution- Partial recomputation matters when edges change.
- Ready nodes expose available parallelism.
- Cycle reporting improves operational debugging.
Not StartedNetwork Delay TimeDijkstraMediumCore
Optional introduction to weighted shortest paths after BFS is comfortable.
Senior follow-ups 3
Which property of nonnegative weights makes Dijkstra safe?
What changes if edge costs update during queries?
How might a graph be partitioned without hiding cross-partition routes?
From Algorithm to Design
Where this appears in systems: routing and path planning- The graph model and weight meaning determine the algorithm.
- Changing topology may invalidate precomputed paths.
- Partition boundaries add coordination and stale-route concerns.
Mastery Check
- Select BFS, topological reasoning, or Dijkstra from graph properties.
Heap & Streaming RefreshRetain only the candidates required by an online or ranked query.Core
Heap & Streaming Refresh
Why am I learning this?
Retain only the candidates required by an online or ranked query.
Prerequisites
Start here - no required prerequisite.
Learn
- Bounded heaps
- Extreme-value queries
- Streaming updates
Recognize It When…
- Only the best K or current median matters
Core Problems
2Not StartedTop K Frequent ElementsFrequency map + Top KMediumCore
Composes counting with candidate selection and supports multiple valid strategies.
The senior signal is selecting batch, bounded-state, or approximate processing from the workload rather than defaulting to one accepted algorithm.
Engineering trade-offs
| Approach | Time | Space | Use when |
|---|---|---|---|
| Full sort | O(n log n) | O(n) | The dataset is already in memory and simplicity matters. |
| Heap of K | O(n log k) | O(n) + O(k) | k is much smaller than the number of candidates. |
| Buckets | O(n) | O(n) | Frequency is bounded by input size and memory is acceptable. |
| Bounded stream state | Update-dependent | Bounded / approximate | The history cannot be retained and exactness is negotiable. |
Interview follow-ups
- When would you choose a heap over frequency buckets?
- How does the complexity change when K is close to n?
Senior follow-ups 4
What state must be retained when updates never stop?
Can the solution retain K candidates instead of all observations?
If exact heavy hitters are too expensive, what error could the product tolerate?
How would partial Top-K results be merged across partitions?
From Algorithm to Design
Where this appears in systems: ranking and analytics- Partition-local candidates can be merged into a global ranking.
- Time windows change retained state.
- Approximate heavy hitters can reduce memory.
Mastery Check
- Explain what state can be discarded forever.
DP State RefreshUse one sequence problem to verify state definition and optimization fluency.Core
DP State Refresh
Why am I learning this?
Use one sequence problem to verify state definition and optimization fluency.
Prerequisites
Start here - no required prerequisite.
Learn
- State meaning
- Transition order
- Quadratic versus optimized formulation
Recognize It When…
- A sequence answer depends on best smaller prefixes
Core Problems
1Not StartedLongest Increasing SubsequenceSequence DP / binary tailsMediumCore
Creates a high-signal comparison between an intuitive quadratic DP and optimized tails invariant.
Senior follow-ups 2
Compare the explainable O(n²) DP with the O(n log n) tails invariant.
What additional state is needed to reconstruct an actual subsequence?
Mastery Check
- Derive the O(n²) state before comparing the tails optimization.
Sign in to persist problem state across this roadmap and the question library.