DAY1
Arrays, hashing, complexity
Block A · Revise these three
Big-O, read off the loops.One loop over n is O(n). A loop inside a loop is O(n²). Halving each step is O(log n). Sorting is O(n log n).
Hash map and hash set in your language.Average O(1) insert and lookup. That is the trade: extra O(n) memory to remove a nested loop.
Prefix sums.Build once in O(n), then any range sum in O(1).
Block B · Solve these four
Two SumThe hash map that turns O(n²) into O(n). Learn this one properly; everything else copies it.
Contains DuplicateSet in one pass.
Maximum Subarray (Kadane's)O(n). The "restart or continue" decision.
Subarray Sum Equals KPrefix sum plus a hash map. The pattern behind a lot of medium questions.
Block C · Write down
Your language's map, set and sort — the exact syntax, from memory.Declare, insert, look up, iterate, sort with a custom comparator. Half a page. You will use it every day this week.
You are done for today when you can say, without looking, why Two Sum is O(n) and what it costs in memory.
DAY2
Two pointers, sliding window
Block A · Revise these three
Two pointers from both ends.Needs a sorted array. Sum too small, move left up; too big, move right down.
Fixed-size window.Add the entering element, remove the leaving one. Never recompute the whole window.
Variable-size window.Grow with the right pointer while the window is valid; shrink from the left the moment it breaks.
Block B · Solve these four
Two Sum II (sorted input)The both-ends pattern in its purest form.
Container With Most WaterWhy you always move the shorter side. Be able to say the reason out loud.
Longest Substring Without Repeating CharactersVariable window plus a set. The single most asked window question.
Maximum Average Subarray IFixed window. Five minutes. Do it to feel the difference.
Block C · Write down
One sliding-window template, in your language, that you can type from memory in 60 seconds.while right < n: expand; while invalid: shrink; record the answer.
You are done for today when you can look at a question and say "sorted, so two pointers" or "contiguous substring, so window" before writing anything.
DAY3
Binary search and sorting
Block A · Revise these three
The binary search template that does not break.while low <= high, mid = low + (high - low) / 2, then move low = mid + 1 or high = mid - 1. O(log n).
First and last occurrence.Same loop, but on a match you record the answer and keep searching one side instead of returning.
Binary search on the answer.When the question says "minimum largest" or "smallest capacity", you search the answer range, not the array.
Block B · Solve these four
Binary SearchType the template until it is automatic.
Search in Rotated Sorted ArrayDecide which half is sorted, then decide if the target is inside it.
Find First and Last Position of ElementTwo runs of the same modified search.
Koko Eating BananasBinary search on the answer. Once this clicks, a family of mediums opens up.
Block C · Write down
The complexities of your sort, plus one line on when sorting first is worth it.Sorting is O(n log n). Worth it whenever it turns an O(n²) scan into an O(n) sweep.
You are done for today when you write a binary search with no off-by-one and no infinite loop, twice in a row.
DAY4
Stacks, queues, linked lists
Block A · Revise these three
Stack, and the monotonic stack idea.Last in, first out. Keep the stack increasing or decreasing and you answer "next greater element" in O(n).
Queue and deque.First in, first out. A deque adds and removes at both ends — that is what powers the sliding-window maximum.
Linked list pointer handling.A dummy head node removes almost every edge case. Slow and fast pointers find the middle and detect cycles.
Block B · Solve these four
Valid ParenthesesThe stack question every company has asked at least once.
Next Greater Element IMonotonic stack. Draw the stack on paper as you go.
Reverse Linked ListThree pointers: prev, curr, next. Be able to write it iteratively and recursively.
Merge Two Sorted ListsDummy head. It is also the merge step you will reuse in sorting questions.
Block C · Write down
A diagram of reversing a linked list, with the pointers drawn at every step.Draw it. Do not copy the code. In an interview you will be asked to draw it too.
You are done for today when you can reverse a linked list on paper, with no IDE, and the arrows are right.
DAY5
Trees and graphs (BFS/DFS)
Block A · Revise these three
DFS with recursion; BFS with a queue.On a graph with V nodes and E edges both are O(V + E). On a tree, O(n).
The three tree traversals.Inorder, preorder, postorder. Inorder on a BST comes out sorted — remember that one fact.
The visited set, and the grid version.Any graph question without a visited set loops forever. On a grid, the neighbours are up, down, left, right.
Block B · Solve these four
Maximum Depth of Binary TreeThe smallest possible DFS. Start here.
Binary Tree Level Order TraversalBFS with a queue, one level per loop turn.
Number of IslandsGrid DFS or BFS. The most common graph question in campus tests.
Rotting OrangesMulti-source BFS. Push every rotten orange first, then spread level by level.
Block C · Write down
One BFS template and one DFS template, plus how you store a graph.Adjacency list, not a matrix, unless the question hands you a grid.
You are done for today when you can decide BFS or DFS in five seconds: shortest path in an unweighted graph means BFS, anything else means DFS.
DAY6
Dynamic programming basics
Block A · Revise these three
What a "state" is.The smallest set of values that describes where you are. dp[i] usually means "the best answer using the first i items".
Memo (top-down) and table (bottom-up).Same recurrence, two ways to store it. Write the recursion first, then add the cache.
Reading the complexity off the table.Number of states times the work per state. A 1-D table filled in one pass is O(n).
Block B · Solve these four
Climbing StairsFibonacci in disguise. The first DP anyone should write.
House RobberTake it or skip it. That choice is the whole of DP.
Coin ChangeUnbounded choices, minimum answer. The template you will reuse most.
Longest Common SubsequenceYour one 2-D table. Draw the grid and fill five cells by hand before you code it.
Block C · Write down
For each of the four, one line: what does dp[i] mean, and what is the recurrence?If you cannot write those two lines, you have copied the solution, not learned it.
You are done for today when you can state dp[i] in words for all four problems without opening them.
DAY7
Mock test, then your own mistakes
Block A · The mock, 90 minutes, timer on
Pick three unseen problems: one easy, two medium. Sit down at the same hour as your real test.Phone in another room. No editorials, no autocomplete help, no tab switching. Treat it as the real thing.
Block B · Mark your own paper
For every question you missed, write one line: what exactly went wrong?Not "I did not know DP". Something like "I forgot to reset the visited set" or "I read the constraints after coding".
Sort those lines into three buckets: didn't know it, knew it but was slow, silly mistake.Silly mistakes are the cheapest marks in your whole week. Fix those first.
Re-solve the two you got wrong, from scratch, closed book.Not reading the solution again. Typing it again.
Block C · The one-page sheet
Copy your six notebook pages down to one page you can read in ten minutes.Templates, complexities, and your three most common silly mistakes. That page is what you read tomorrow morning.
You are done for today when the one-page sheet exists on paper and the laptop is shut. Nothing after this helps.
The night before
The last night changes almost nothing about what you know, and almost everything about what you can use.
Stop studying by 9 p.m. Sleep seven hours.Tired reading of a new topic on the last night has never added a mark to anyone's score. Sleep has.
Re-read only your one-page sheet. Nothing else.Ten minutes. Not a playlist, not a "must-do 50 questions" list, not someone's Instagram story about their offer.
Check the setup tonight, not tomorrow.Laptop charged and charger packed. Working internet plus a mobile hotspot as backup. Browser updated.
Log in to the platform once and run one sample question.HackerRank, HackerEarth, CoCubes, Codility: know where Run, Compile and Submit are, and which language versions are listed.
Confirm the format: how long, how many questions, is it proctored, are MCQs included.Read the mail again. Note the exact start time and set two alarms.
Keep a pen and four sheets of blank paper on the desk.You will draw a tree or a pointer diagram. Doing it on paper is faster than doing it in your head.
Water, a full meal before, no new energy drink experiments.90 minutes is short. You do not need a fourth coffee.
Nothing you learn tonight will be available to you tomorrow. Everything you rest will be.
The test itself
A 90-minute, three-question round. Adjust the clock to your paper, keep the order.
0 – 5 min
Read all three questions. Rank them easy, medium, hard.Solve in that order, not in the order printed. Marks are usually equal.
5 – 25 min
The easiest one. Get it fully accepted before you touch anything else.One certain solve beats two half-solves. Always.
25 – 55 min
The second one. Brute force first, submit it, then optimise.A partially scoring brute force in the box is worth more than an elegant idea in your head.
55 – 85 min
The hardest one, or improve question 2.Read the constraints: n up to 10⁵ rules out O(n²); n up to 20 hints at recursion over subsets.
85 – 90 min
Re-submit everything and confirm each submission registered.Do not spend the last minute typing a new idea.
When to submit a brute force. If 15 minutes are gone and the clever idea has not arrived, write the O(n²) version and submit. Partial marks are real marks, and a working brute force often shows you the pattern.
How to debug fast. Print the variable you least trust, on the smallest failing input. Check the empty case, the single-element case, and the last index. Most wrong answers in campus tests are an off-by-one or an unreset variable, not a wrong algorithm.
Read the input format twice. Multiple test cases in one run is the most common silent zero.
If you only have 2 days
Here is the honest version. In two days you cannot cover seven topics. You can cover the three that appear most, and you can stop making silly mistakes.
Day 1 · four hours
Arrays, hashing, two pointers, sliding window.Two Sum, Contains Duplicate, Longest Substring Without Repeating Characters, Maximum Subarray. Write the window template once.
Binary search, the template only.Binary Search, then Search in Rotated Sorted Array. Skip binary search on the answer.
Day 2 · four hours
Stacks and BFS/DFS on a grid.Valid Parentheses, Number of Islands. These two cover a surprising share of question 2.
One 60-minute mock with two unseen problems, then mark it.Cut the mock before you cut the revision. Then read your one-page sheet and stop.
Cut, in this order. Drop DP first: it has the worst return in two days. Then drop trees and keep only grid BFS/DFS. Never drop the mock, and never drop sleep. A tired student loses more marks to typos than to topics.
If you have one day: arrays and hashing in the morning, one 60-minute mock in the evening, sleep. That is the whole plan, and it is still better than eleven random questions.
Print this tracker
One row per day, three boxes per row: Revise, Solve, Write. Stick it above your desk and tick as you finish each block.
Day
Topic
A · B · C
Day 1
Arrays, hashing, complexity
Day 2
Two pointers, sliding window
Day 3
Binary search and sorting
Day 4
Stacks, queues, linked lists
Day 5
Trees and graphs (BFS/DFS)
Day 6
Dynamic programming basics
Day 7
Mock test, then your mistakes
Night
One-page sheet, setup, sleep
My test is on ______________ at ____:____ , on ____________________ , ______ minutes, ______ questions.
My language for this week: ____________________
My three most common silly mistakes: ______________________________________________