parikshan

The roadmap

Read the pattern. Then ship the code.

107 concept articles across 15 pattern clusters. The order matters. Skip ahead and dynamic programming will eat you alive.

Architect-grade tracks

Topic primers

The full roadmap

The Roadmap

A topic-clustered, difficulty-tiered path through all 105 problems. Designed so a learner with zero algorithmic background can finish in order and end with the toolkit a working software engineer needs to direct AI agents, audit their output, and ship correct systems in the agentic era.

The new bargain

You will not spend your career typing for-loops. AI agents will. What you will spend your career doing is:

  1. Reading a problem and recognising, in seconds, which of about 15 patterns it belongs to.
  2. Specifying the work to an agent in the vocabulary of that pattern (sliding window, monotonic stack, topo sort).
  3. Reading the agent's code and noticing where it picked the wrong pattern, the wrong invariant, the wrong complexity class.
  4. Refusing wrong answers before they reach production.

Every problem in this bank trains one or more of those four. The code you type while learning is throwaway; the pattern-recognition reflex you build is permanent.

Reading order matters

Topics are placed in dependency order. Hashing comes before two pointers because sorted arrays use hashing in proofs. Stacks come before trees because tree traversal is "stack with names". Graphs come after trees because a tree is a graph with one extra rule. Dynamic programming comes last among the "core" topics because DP is built from recursion plus memoization, both of which you've already seen by then.

Do not skip ahead. Each topic earns its slot.

The enterprise reality check

Every topic primer in this roadmap names the named systems where its pattern shows up: not "social networks", but Slack, Twitter/X, Discord. Not "rate limiting", but Stripe, Cloudflare, Fastly. Not "search", but Google, Bing, Elasticsearch. The reason is that you will be employed at, or competing with, those companies; the patterns must be tied to the systems you will actually maintain.

Each problem's deep article includes a "Where this shows up in the enterprise" section with six to ten named products and teams. That list is the gap between "I learned this algorithm" and "I know which production system needs it". Closing that gap is the entire point.

The integrated learning loop

The 105 problems are not exercises sitting in a folder. They are entry points into a six-stage loop that the parikshan platform runs end-to-end:

  1. Concept article sets the pattern.
  2. Practice mode in the parikshan editor lets you attempt with no penalty and free AI chat.
  3. Exam mode runs the strict engine: full-screen lock, dual-camera proctoring (laptop + phone side-view), per-session dynamic tests so memorisation fails, graduated integrity penalties for each AI invocation.
  4. AI training assistant, available in both modes, is a sparring partner with graduated cost: free in practice, integrity-deducting in exam.
  5. Hints are levelled; each costs more integrity than the last.
  6. Dispute flow lets you appeal a verdict to a human reviewer if you believe it is wrong.

These features are not separate. They are one continuous loop, and the recorded data from all six (which hint, which AI intent, which violation, which override) is what makes a parikshan score trustworthy to a hiring manager. A score from a memorisation farm has none of this signal; a parikshan score carries the entire behavioural transcript.

How long it takes

Honest estimates for a learner doing one focused hour per day:

TierTopicsHours
FoundationsArrays & Hashing, Two Pointers, Sliding Window, Stack~25h
Search & StructuresBinary Search, Linked List, Trees~20h
Combinatorial & NetworkBacktracking, Graphs~20h
Optimization1-D DP, 2-D DP, Greedy~25h
SpecialtyIntervals, Math/Matrix/Heaps, Bits~10h

Total: about 100 hours of deliberate practice. People who try to do it in 20 hours bounce off DP and quit; people who give it 100 hours leave with a permanent skill.

What to do for each problem

  1. Read the topic primer (in _topics/).
  2. Read the concept article for the problem (seed/concepts/{problem-id}.md).
  3. Close the article. Open parikshan. Solve the problem from scratch. If you peek, restart.
  4. After you get AC, re-read the article and check: did you find the same insight, or a different one? Either is fine. The skill is the insight, not the code.

Tier 1: Foundations

1. Arrays & Hashing (14 problems)

Primer. The single most useful pattern in this entire bank: trade memory for time by remembering what you've seen.

ProblemDifficultyWhy it's here
contains-duplicateEasyThe hashing primer: set-membership in O(n).
valid-anagramEasyCounting characters with a frequency map.
two-sumEasyHash the complement; the canonical "remember what you've seen" trick.
majority-elementEasyCounting + Boyer-Moore vote (a pattern you'll see again).
first-unique-characterEasyTwo-pass frequency counting.
happy-numberEasyCycle detection in a sequence using a set.
missing-numberEasySum trick or XOR; bridge to bit manipulation.
find-pivot-indexEasyPrefix sums in their simplest form.
group-anagramsMediumHashing with a canonical key.
top-k-frequent-elementsMediumHash count + bucket sort or heap.
product-of-array-except-selfMediumPrefix and suffix passes; no division.
encode-decode-stringsMediumLength-prefix encoding; small but everywhere in real protocols.
subarray-sum-equals-kMediumPrefix sum + hash map; the "running total + memory" pattern.
longest-consecutive-sequenceMediumHash set with "only start from sequence heads"; O(n) without sorting.

2. Two Pointers (11 problems)

Primer. When the input is sorted (or can be), two indices walking inward or in tandem replace an O(n²) brute force with O(n).

ProblemDifficultyWhy
reverse-stringEasyThe simplest meeting-in-the-middle pattern.
valid-palindromeEasyTwo pointers with skip rules.
merge-sorted-arrayEasyTwo pointers from the back to avoid an extra buffer.
remove-duplicates-from-sorted-arrayEasyThe "slow/fast" overwrite pattern.
move-zeroesEasySame slow/fast pattern, different invariant.
two-sum-ii-sortedEasyThe two-sum problem when the array is sorted: O(n), no hash map.
three-sumMediumSort, fix one, two-pointer the rest.
container-with-most-waterMediumThe "move the smaller side" invariant.
sort-colorsMediumDutch National Flag: three pointers in one pass.
reverse-words-in-stringMediumReverse-then-reverse trick; in-place string manipulation.
trapping-rain-waterHardTwo pointers tracking running maxima; a small classic.

3. Sliding Window (8 problems)

Primer. A contiguous range you grow and shrink as it walks down the array. Comes up any time the question is about a subarray or substring with a property.

ProblemDifficultyWhy
maximum-average-subarray-iEasyFixed-size window: the warm-up.
best-time-to-buy-and-sell-stockEasyA min-so-far is a degenerate window; same single-pass mindset.
longest-substring-without-repeatingMediumVariable-size window with a hash set.
longest-repeating-character-replacementMediumWindow + invariant on max frequency.
permutation-in-stringMediumWindow with frequency comparison.
minimum-size-subarray-sumMediumShrinking from the left once the property is met.
minimum-window-substringHardThe boss-level window problem; demands two counters.
sliding-window-maximumHardWindow plus a monotonic deque.

4. Stack (7 problems)

Primer. The LIFO data structure shows up wherever you need to remember the most recent unfinished thing: parentheses, expressions, "next greater" patterns.

ProblemDifficultyWhy
valid-parenthesesEasyThe canonical LIFO matching problem.
next-greater-element-iEasyFirst taste of monotonic stack.
implement-queue-using-stacksEasyAmortised analysis through structural transformation.
min-stackMediumAuxiliary stack to maintain a running invariant.
evaluate-reverse-polish-notationMediumStack as the abstract machine for postfix expressions.
generate-parenthesesMediumStack-shaped recursion with pruning.
daily-temperaturesMediumMonotonic decreasing stack for "next greater".

Tier 2: Search & Structures

5. Binary Search (6 problems)

Primer. Halve the search space each step. The "answer is in [lo, hi]" template generalises far beyond sorted arrays.

ProblemDifficultyWhy
binary-searchEasyThe textbook. Spend extra time on the invariant; the rest is variations.
search-insert-positionEasyLower-bound search.
first-bad-versionEasyBinary search on a predicate, not an array.
sqrt-xEasyBinary search on the answer space (the integers).
find-min-in-rotated-sorted-arrayMediumBinary search when the array is broken but locally sorted.
search-in-rotated-sorted-arrayMediumSame shape, harder predicate.

6. Linked List (7 problems)

Primer. Pointer surgery. Most problems reduce to "use two pointers" or "build a new list". Always carry a dummy node.

ProblemDifficultyWhy
reverse-linked-listEasyThe pointer-swap pattern.
merge-two-sorted-listsEasyDummy-head construction.
middle-of-linked-listEasySlow/fast pointers (the tortoise and hare).
palindrome-linked-listEasyReverse half, compare halves.
remove-nth-from-endMediumLookahead pointer; single-pass.
add-two-numbersMediumCarry propagation in linked-list arithmetic.
lru-cacheMediumDoubly-linked list + hash map. The first "design" problem.

7. Trees (10 problems)

Primer. Almost every tree problem is solved by one of three recursions: DFS returning a value, DFS with an accumulator, or BFS by level.

ProblemDifficultyWhy
maximum-depth-of-binary-treeEasyThe cleanest DFS.
invert-binary-treeEasyRecursion on shape.
same-treeEasyTwo-tree recursion.
symmetric-treeEasyMirror recursion.
balanced-binary-treeEasyDFS returning two facts at once.
diameter-of-binary-treeEasyDFS with a side effect on a global.
path-sumEasyDFS with a running accumulator.
binary-tree-level-order-traversalMediumBFS with explicit levels.
validate-bstMediumDFS with bounds.
lowest-common-ancestor-bstMediumWalk down using BST ordering.

Tier 3: Combinatorial & Network

8. Backtracking (4 problems)

Primer. Recursion that explores choices and undoes them. The shape is identical across problems; only the choice and the constraint change.

ProblemDifficultyWhy
letter-combinations-phoneMediumThe friendly intro; one digit, multiple choices.
subsetsMediumPick-or-skip recursion.
permutationsMediumChoice with used-set.
combination-sumMediumBacktracking with reuse and pruning.

9. Graphs (10 problems)

Primer. Once you have BFS and DFS, almost everything else follows. Grid problems are graphs; topological sort is DFS with state.

ProblemDifficultyWhy
flood-fillEasyThe smallest BFS/DFS on a grid.
number-of-islandsMediumCounting connected components.
max-area-of-islandMediumSame shape; return a sum.
clone-graphMediumDFS with a memoisation map.
rotting-orangesMediumMulti-source BFS.
pacific-atlantic-water-flowMediumReverse BFS from the borders.
course-scheduleMediumCycle detection in a directed graph.
course-schedule-iiMediumTopological sort.
detect-cycleMedium3-colour DFS, an industry-strength pattern.
word-ladderHardBFS over an implicit graph.

Tier 4: Optimization

10. 1-D Dynamic Programming (10 problems)

Primer. When greedy choices fail, when the answer at position i depends on the answer at smaller positions, DP is the tool. Always start from the recurrence, not the loop.

ProblemDifficultyWhy
climbing-stairsEasyThe gateway DP; Fibonacci in disguise.
min-cost-climbing-stairsEasyAdd a cost; same recurrence.
house-robberMediumPick-or-skip with a constraint.
maximum-subarrayMediumKadane's algorithm.
maximum-product-subarrayMediumKadane with two states (min and max).
jump-gameMediumDP made obsolete by greedy; you'll learn both.
jump-game-iiMediumBFS-flavoured greedy.
coin-changeMediumUnbounded-knapsack flavour.
longest-increasing-subsequenceMediumThe classic O(n²) DP, then patience sorting for O(n log n).
longest-palindromic-substringMediumExpand around centre, or 2-D DP.

11. 2-D Dynamic Programming (3 problems)

Primer. Two inputs, two indices, a 2-D table. The state-transition diagram is the entire problem.

ProblemDifficultyWhy
unique-pathsMediumThe cleanest 2-D DP.
longest-common-subsequenceMediumThe string-DP template.
edit-distanceHardThe boss; three operations, three transitions.

12. Greedy (3 problems)

Primer. Make the locally best choice; prove it's globally optimal. Half the difficulty is recognising when greed works.

ProblemDifficultyWhy
last-stone-weightMediumGreedy with a heap.
gas-stationMediumThe "if from A you can't reach B, neither can anyone between" argument.
partition-labelsMediumGreedy on last-occurrence indices.

Tier 5: Specialty

13. Intervals (2 problems)

Primer. Sort by start, then sweep. Most calendar and scheduling problems live here.

ProblemDifficultyWhy
meeting-roomsEasyDetect overlap.
merge-intervalsMediumMerge overlapping runs.

14. Math, Matrix & Heaps (8 problems)

Primer. A bucket for problems that don't fit elsewhere but share a flavour: a precise transformation or a careful counting argument.

ProblemDifficultyWhy
plus-oneEasyDigit-array arithmetic.
roman-to-integerEasySingle-pass parsing with peek.
longest-common-prefixEasyVertical scan.
implement-strstrEasyNaive substring search; gateway to KMP.
spiral-matrixMediumBoundary walking.
rotate-imageMediumTranspose + reverse, or layer-by-layer.
k-closest-points-to-originMediumHeap; quickselect alternative.
kth-largest-elementMediumHeap or quickselect.

15. Bit Manipulation (2 problems)

Primer. XOR tricks and bit counting. Small topic, big interview footprint.

ProblemDifficultyWhy
number-of-1-bitsEasyBrian Kernighan's trick.
single-numberEasyXOR's "everything cancels" property.

After you finish

You will have solved 105 problems across 15 patterns. The patterns are not a list; they are a reflex. When you next read a problem statement at work or in an interview, you will catch yourself thinking "this is a sliding-window question" before you finish reading it. That reflex is the entire skill, and it is hard to fake. The 100 hours buy you that reflex.

In the agentic-AI workspace this reflex is what makes you irreplaceable. The agent will write the code. You will name the pattern, set the invariant, and refuse the wrong answer. The candidate who can do this in 30 seconds will ship 20 features in the time the candidate who cannot ships one.

From here, you can extend in any of three directions: harder problems in the same patterns, classic algorithms you didn't need here (KMP, Dijkstra, Union-Find, segment trees), or system design. All three reward the same kind of thinking you just trained.