Skip to content
All roadmaps

Crack the coding round

The data structures, the patterns and the habits that get you through online tests, coding rounds and an SDE-1 design round.

Field
Interview preparation
Role
Software engineer (SDE)
Experience
Student or fresher0 to 2 years2 to 5 years

Who it is for. You already write code in Python or Java, and you have campus placements, an off-campus drive or a job switch coming up in the next three or four months.

About 3 months at 9 hours a week · 6 stages · 19 topics

  1. Stage 1 of 6 · 1 week

    Your language, cost and a practice habit

    Goal: You know your language's lists, maps and sets by heart, can say the cost of a loop, and have a fixed time each day to practise.

    1. Use the language you write fastest, Python or Java, for every problem from now on. Know its list, map, set and sort without looking them up.

    2. Count how the work grows as the input grows. Every interviewer will ask for the cost of your answer.

    3. About an hour a day, five days a week: one new problem, and one old problem solved again from memory. Keep a log of every mistake and why you made it.

  2. Stage 2 of 6 · 3 weeks

    Arrays, hashing and the method

    Goal: You can solve array and string problems with hash maps, two pointers and binary search, using one method you follow every time.

    1. The rows and chains almost every problem is built on, and what each operation on them costs.

    2. The most common tool in coding rounds. Many slow answers become fast once you remember what you have already seen.

    3. Learn it now and use it on every practice problem from here on, so it holds up when you are nervous.

    4. Avoid checking every pair, and find a value or a boundary in a sorted range by halving it.

    Build this

    Your pattern notebook

    One page per pattern: the words in a problem that point to it, a template in your language, and three problems you solved with it. Add to it in every later stage and reread it the night before each interview.

  3. Stage 3 of 6 · 3 weeks

    Recursion, trees and heaps

    Goal: You can write recursive solutions with confidence, visit a tree in any order, and use a heap to keep the most urgent item on top.

    1. Solve a big job by solving a smaller copy of it. Trees, graphs and backtracking all depend on this.

    2. Traversals, depth, paths and checks on a search tree: some of the most asked problems at SDE-1 level.

    3. Top k items, merging sorted lists and running medians all come down to a heap.

  4. Stage 4 of 6 · 3 weeks

    Graphs and the classic problems

    Goal: You can model a problem as a graph, search it, and tell from a problem's wording which tool it needs.

    1. Grids, friend lists, course orders and routes are all graphs. Learn to store them and search them.

    2. The words in a problem that point to a hash map, a window, a stack, a heap or a graph search.

    3. Problems interviewers ask again and again, each worked with its cost and a tested example. Solve each yourself before you read the answer.

  5. Stage 5 of 6 · 3 weeks

    Low-level design for SDE-1 rounds

    Goal: Given a short brief, you can draw the classes, explain how they work together and write the main code.

    1. Class diagrams, private data, composition and interfaces: the vocabulary of every design round.

    2. SOLID, and the Strategy, Factory and Observer patterns. Name them only where they fit.

    3. See how a design round runs from the brief to working code.

    Build this

    Design one system on your own

    Pick a brief you have not seen worked, such as a movie ticket booking system or a food delivery order flow. Give yourself 45 minutes for the requirements, classes, diagram and main code, then compare it with the two case studies.

  6. Stage 6 of 6 · 2 weeks

    Mock interviews and the last weeks

    Goal: You have done at least three timed mock interviews and fixed the habits they showed up.

    1. Explain your thinking out loud, say the cost in words, and find your own bugs before the interviewer does.

    2. Two timed sets a week: two problems in 45 minutes, in a plain editor, as an online test would run. Then redo every problem in your mistake log once more.

    3. Prepare four or five stories from projects, internships or college: a hard bug, a disagreement, a deadline, something you are proud of. Tell each as situation, task, action and result.

    Build this

    Three mock interviews

    Ask a friend or a senior to interview you three times, 45 minutes each, with a problem you have not seen and a camera on. Swap roles afterwards: being the interviewer shows you what they listen for.

By the end you can

  • Pick the right data structure for a problem and say what your solution costs in time and memory.
  • Work a problem you have not seen from a blank page to tested code, explaining your thinking out loud.
  • Recognise the common patterns: hash map lookups, two pointers, sliding windows, binary search, trees, heaps and graph searches.
  • Turn a paragraph of requirements into classes and working code in a low-level design round.
  • Go into an interview having done at least three mock interviews under real time limits.

Ticks are your own notes on how far you are. They stay in this browser and nowhere else. The times assume 9 hours a week; go slower or faster as your days allow.

More roadmaps

  • Low-level design, system design and a sharper coding round: what product companies test before they hire you as SDE-2.

    About 6 months at 8 hours a week · 8 stages

  • Backend developer, from zero

    Student or fresher0 to 2 years

    From your first program to an API you built, tested and put online, with a database behind it.

    About 8 months at 10 hours a week · 7 stages