Step 1: Pick one language and stick to it
C++, Java or Python are all fine. What matters is that you can read input, write loops and functions, and debug without help.
- Know arrays, strings and functions well
- Learn built-in data structures (STL / Collections / lists & dicts)
- Practise 20–30 easy problems before moving on
Step 2: Learn complexity early
Time and space complexity tell you whether your solution will pass. Interviewers almost always ask about it.
- Big-O of loops and nested loops
- Why O(n log n) beats O(n²)
- Space used by recursion
Step 3: Core topics in order
Follow an order where each topic builds on the previous one.
- Arrays → two pointers → sliding window
- Strings and hashing
- Searching and sorting, binary search
- Recursion and backtracking
- Linked lists, stacks and queues
- Trees and BST
- Graphs: BFS and DFS
- Basic dynamic programming
Step 4: Practise patterns, not random problems
Most interview problems are variations of a few patterns. Solve 5–10 problems per pattern and write down the idea behind each.
- Revise solved problems weekly
- Time yourself on easy and medium problems
- Explain your solution out loud
Learn it with CodeMBS
Data Structures & Algorithms
The problem-solving skill every technical interview tests.
View course →Included in membershipC++ Programming
Object-oriented programming and the language of competitive coding.
View course →Included in membershipPlacement Preparation
Get ready for the aptitude, coding and interview rounds of campus recruitment.
View course →