DSA Roadmap for Coding Interviews in 2027: Topics, Order and Plan

A DSA roadmap for coding interviews: what to learn first, the order of topics, a week-by-week 12-week schedule and how to review your progress.

DSA Roadmap for Coding Interviews in 2027: Topics, Order and Plan

A DSA roadmap for coding interviews in 2027 starts with one language and complexity basics, then moves through arrays, strings and hashing, linked lists, stacks and queues, recursion, binary search, trees, heaps, graphs and dynamic programming. A 12-week plan, with a few problems per topic and a weekly review, is enough to build a solid base for most fresher interviews.

Key takeaways

  • Learn one language and Big-O first, then follow topic dependencies instead of random lists.
  • Arrays, strings and hashing come early. Dynamic programming comes last.
  • The 12-week table gives weekly topics and illustrative practice goals that you can scale.
  • A problem log with revisits after 1 day, 1 week and 3 weeks turns solving into learning.

On this page:

WeeksTopicsPractice goal (illustrative)
1One language, Big-O basics, loops and functions10 easy problems, state the complexity of each
2Arrays, strings, prefix sums8-10 problems
3Hash maps and sets, frequency counting8-10 problems
4Two pointers, sliding window, binary search8-10 problems
5Linked lists, stacks, queues8-10 problems
6Recursion and backtracking, sorting8 problems
7Binary trees and BST8-10 problems
8Heaps and priority queues6-8 problems
9Graphs: BFS, DFS8 problems
10Dynamic programming: 1D8 problems
11Dynamic programming: 2D, greedy8 problems
12Mixed timed practice, mock interviews, revision2 timed sets and 2 mock rounds

What should you know before starting DSA?

You need one language you can write loops, functions and basic collections in, plus the ability to read Big-O. Without these, every topic feels harder than it is.

Pick Python, Java or C++ and stay with it. Choosing between them is covered in Python vs Java for beginners. Then learn to count work. A single loop over n items is O(n). A loop inside a loop is O(n^2). Halving the search space each step is O(log n).

def has_pair(nums, target):
    seen = set()
    for x in nums:                # O(n) loop
        if target - x in seen:    # O(1) average set lookup
            return True
        seen.add(x)
    return False

This runs in O(n) time and O(n) space. The brute force, checking every pair, is O(n^2) time and O(1) space. Being able to state this trade-off is the first interview skill. For an overview of every structure, read data structures and algorithms explained with examples.

In what order should you study the topics, and why?

Study in order of dependency: each topic should use ideas from the previous ones. Skipping ahead is why many learners stall on trees or dynamic programming.

  1. Arrays, strings, hashing. These make up the bulk of easy and medium questions. See hash maps with examples.
  2. Two pointers, sliding window, binary search. Patterns that cut O(n^2) to O(n) or O(log n). See binary search with code.
  3. Linked lists, stacks, queues. Pointer thinking. See linked lists and stacks and queues.
  4. Recursion, then trees. Trees are recursion made visible. See how recursion works and tree traversals.
  5. Heaps and graphs. BFS uses a queue, DFS uses recursion or a stack.
  6. Dynamic programming last. It needs recursion, memoisation and comfort with state. See dynamic programming 101.

How do you run the 12-week practice schedule?

Use the table above and a fixed weekly rhythm. The problem counts are a starting point, not a requirement, so adjust them to your time.

Illustrative weekly rhythm for a student with two hours on weekdays and four on weekends:

  • Monday and Tuesday: learn the topic from one source and implement the structure yourself.
  • Wednesday to Friday: solve easy, then medium problems on that topic. Time-box each to 30 to 40 minutes before reading a hint.
  • Saturday: redo two problems from earlier weeks without looking at old solutions.
  • Sunday: rest, or a light review of your mistake log.

Working professionals with one hour a day can stretch the plan to 16 to 18 weeks. A longer plan done consistently beats a short plan abandoned in week five. If the plan slips, drop problems, not review sessions.

How do you review solutions and track progress?

Keep a log with one row per problem and revisit failures on a schedule. Solving a problem once proves little. Solving it cold a week later proves you learnt the pattern.

Suggested columns for your log:

  • Problem name and link, topic and pattern (for example sliding window).
  • Your time to first working solution, and whether you needed a hint.
  • The mistake or missing insight, in one sentence.
  • Time and space complexity of your final solution.
  • Revisit dates: after 1 day, 1 week and 3 weeks.

After each solve, read one other solution and ask what it does differently. Then rewrite yours from memory. In the last two weeks, practise explaining out loud: restate the problem, give a brute-force idea, improve it, state complexity, then code. The method is detailed in the 7-step approach to solving coding problems. For questions to practise, use most asked DSA interview questions.

Next step

DSA builds the problem-solving base. If you also want to apply it in AI and machine learning work, see the Artificial Intelligence and Machine Learning programme from Vishlesan i-Hub, IIT Patna and check the programme page for the current batch date and eligibility.

Frequently asked questions

How long does it take to prepare DSA for interviews?

A focused 12-week plan with steady daily practice covers the main topics for many fresher interviews. Your starting level, available hours and target companies change the timeline, so adjust the plan to fit.

Which programming language is best for DSA?

The one you already write fluently. Python, Java and C++ are all accepted in most coding interviews. Python is concise, Java and C++ are stricter and faster on large inputs.

Should I learn dynamic programming first?

No. Learn it last. Dynamic programming builds on recursion, hashing and arrays, and it is much easier once you can write recursive solutions and reason about state.

How many problems should I solve?

Quality matters more than count. Aim for a few problems per pattern, solved cleanly and revisited later. The weekly goals in this plan are illustrative targets you can scale up or down.

Do I need DSA for placements?

Many companies test DSA in online assessments and interviews for software roles, though roles differ. Check the process of your target companies and prepare for the format they use.

What if I fall behind the 12-week schedule?

Do not skip review. Cut the number of new problems for the week and keep the revisit sessions. If you fall behind often, extend the plan instead of rushing the later topics.

×

Our Courses

Practice-Based Learning Tracks, Supercharged By A.I.