DSA Learning Roadmap
A structured path to Data Structures & Algorithms for LeetCode and interview prep
To solve DSA problems on LeetCode, you need to learn both Data Structures and Algorithms together.
Learning only data structures is not enough because algorithms teach you how to use those data structures to
solve problems. Since you're a beginner and already know some C and are learning Java, here's the
recommended roadmap.
Complete DSA Learning Order
Step Topic Learn Practice
1 Time & Space Complexity Big O, Omega, Theta Easy analysis
2 Arrays Traversal, insertion, deletion *****
3 Strings String operations, two pointers *****
4 Searching Linear Search, Binary Search ****
5 Sorting Bubble, Selection, Insertion ****
6 Recursion Base case, recursive calls *****
7 Linked List Singly, Doubly, Circular *****
8 Stack Implementation & applications ****
9 Queue Normal, Circular, Deque ****
10 Hashing HashMap, HashSet *****
11 Two Pointers & Sliding Window Common interview techniques *****
12 Prefix Sum Range queries ***
13 Binary Search (Advanced) Search on answer ****
14 Trees Binary Tree, BST *****
15 Heap (Priority Queue) Min Heap, Max Heap ****
16 Greedy Algorithms Activity selection, intervals ****
17 Divide & Conquer Merge Sort, Quick Sort ***
18 Backtracking N-Queens, Sudoku ****
19 Graph BFS, DFS *****
20 Shortest Path Dijkstra, Bellman-Ford ***
21 MST Prim, Kruskal ***
22 Dynamic Programming Memoization, Tabulation *****
23 Bit Manipulation XOR, Bitmask ***
24 Advanced Topics Trie, Segment Tree, Union-Find **
Practice rating: more stars = more important to grind.
What to Learn in Each Phase
Phase 1: Fundamentals
● Time Complexity
● Arrays
● Strings
● Searching
● Sorting
● Recursion
➜ Start solving LeetCode Easy after this phase.
Phase 2: Core Data Structures
● Linked List
● Stack
● Queue
● HashMap / HashSet
➜ Solve Easy + some Medium problems.
Phase 3: Problem-Solving Patterns
● Two Pointers
● Sliding Window
● Prefix Sum
● Binary Search
➜ These patterns appear in hundreds of LeetCode questions.
Phase 4: Trees & Graphs
● Binary Tree
● BST
● Heap
● Greedy
● Graph (BFS & DFS)
Phase 5: Advanced Algorithms
● Dynamic Programming
● Backtracking
● Bit Manipulation
● Divide & Conquer
When Should You Use LeetCode?
● After Arrays → Easy Array problems
● After Strings → Easy String problems
● After Linked List → Linked List problems
● After Stack → Stack problems
● Continue this pattern for each topic
Don't wait until you finish all of DSA. Practice each topic immediately after learning it.
Roadmap for Top Tech Company Prep
Since the goal is companies like Google, Microsoft, Amazon, and Meta, follow this progression:
● Learn one topic
● Solve 10–20 Easy problems on that topic
● Solve 5–10 Medium problems
● Move to the next topic
● Review old topics every week
By the time this roadmap is finished, you'll have solved 200–300 quality LeetCode problems — a solid foundation
for internship and interview preparation. This structured approach is far more effective than solving random
problems without a plan.