What a coding round actually tests
A coding interview is not a test of how many problems you have memorised. Interviewers score roughly the same five things wherever you go:
- Problem solving. Can you get from a vague prompt to a working idea, starting with a brute force and improving it?
- Data structures and algorithms. Do you reach for the right tool, a hash map, a heap, a graph search, and know its cost?
- Code. Is it correct, readable, and written in a language you know well?
- Testing. Do you check your own code against a normal case and an edge case before saying “done”?
- Communication. Could the interviewer follow your thinking the whole time, without asking what you are doing?
Notice that three of the five are about how you work, not what you know. That is why the plan below spends as much time on practicing out loud as on learning patterns.
Before you start: pick one language
Use the language you write fastest, with the standard library you know best. Python, Java, C++ and JavaScript are all fine. Switching languages for interviews costs you weeks of fumbling with syntax that you should spend on problems. Learn the handful of library calls you will use constantly: sorting with a custom key, a hash map with default values, a heap, a double-ended queue, and string building.
The four-week plan
Each week covers a group of patterns. Aim for two or three problems a day, and do not move on from a problem until you could explain the solution to someone else.
Week 1: arrays, hashing and two pointers
- Patterns: hash map lookups, prefix sums, two pointers from both ends, sliding window, sorting as a first step.
- Problems to start with: Two Sum, Group Anagrams, Longest Substring Without Repeating Characters, Merge Intervals and Trapping Rain Water.
- End of week: one timed mock interview on an array problem you have not seen.
Week 2: stacks, binary search, heaps and linked lists
- Patterns: a stack for matching and “next greater”, binary search on a sorted array and on the answer itself, a heap for “top k”, fast and slow pointers.
- Problems to start with: Valid Parentheses, Search in Rotated Sorted Array, Top K Frequent Words and Find Median from Data Stream.
- End of week: a mock interview, then redo week 1's hardest problem from scratch without notes.
Week 3: trees and graphs
- Patterns: depth-first and breadth-first search, recursion on trees, grids as graphs, topological sort, union-find.
- Problems to start with: Number of Islands and Course Schedule, then tree traversals, lowest common ancestor and shortest path in a grid.
- End of week: two mock interviews. Graph problems are where nerves show most, so get the reps in.
Week 4: dynamic programming, design-style problems and full mocks
- Patterns: one-dimensional and two-dimensional dynamic programming, memoised recursion first and tables second, and data-structure design problems.
- Problems to start with: Coin Change, Word Break and LRU Cache.
- End of week: a mock interview every other day, at the length and level of your real interview. Spend the days between redoing the problems you scored worst on.
How to work a single problem
The way you practice each problem matters more than the number you do. Use the same routine every time, because it is the routine you will fall back on in the interview:
- Restate the problem and ask about input size, duplicates, empty input and whether you can modify the input.
- Say a brute force and its time and space complexity, even if it is obviously slow.
- Find the bottleneck in the brute force and name the pattern that removes it.
- Write the code, talking as you go. Name variables properly.
- Test it by hand on one normal case and one edge case, then state the final complexity.
If you are stuck for more than twenty minutes, read the solution, close it, and write it yourself. Then come back to the same problem three days later. Spaced repeats are what make a pattern stick.
Why you need mock interviews, not just problems
Solving a problem silently at your desk and solving it out loud while someone watches the clock are different skills. Plenty of people who can solve medium problems alone freeze in the room because they have never had to explain a half-formed idea. A mock interview every few days shows you where that gap is while there is still time to close it.
A practice interview with an AI interviewer works well here because you can do one whenever you have forty-five minutes. InterviewDryRun runs coding rounds on video: Max asks the question, watches your code in the editor, asks why when you skip a step, and gives you a scored report with three fixes and a model answer. The guide to AI mock interviews explains how to get the most from each session.
Mistakes that waste preparation time
- Counting problems instead of patterns. Three hundred problems solved once teaches less than a hundred solved, understood and repeated.
- Only doing easy problems. Most interviews are pitched at medium. Spend most of your time there.
- Never timing yourself. Without a clock you will not learn when to move from brute force to code.
- Skipping the explanation. If you cannot say why the solution works, you will not find it again under pressure.
- Leaving mocks to the last week. By then you can only find problems, not fix them.