■ Complete DSA in Java Roadmap
■ Phase 0 – Java Foundations (Pre-requisite)
• Java Basics → Data types, Variables, Operators, Loops, Conditionals
• Functions & Recursion → Call by value, Overloading, Recursion basics
• OOP → Classes, Objects, Inheritance, Polymorphism, Encapsulation, Abstraction
• Collections Framework → ArrayList, LinkedList, HashMap, HashSet, Stack, Queue
• Exception Handling & Generics
• Practice: Implement ArrayList & LinkedList from scratch, Solve problems on HackerRank (Java
domain).
• Resources: Head First Java (book), Apna College Java Playlist.
■ Phase 1 – Math + Complexity
• Time & Space Complexity → Big O, Big Ω, Big Θ
• Mathematics for DSA → Prime Numbers, Sieve of Eratosthenes, GCD, LCM, Modular
Arithmetic
• Bit Manipulation → AND, OR, XOR, n & (n-1) trick
• Practice: Problems on primes, gcd, lcm, bit manipulation from LeetCode Easy.
■ Phase 2 – Core Data Structures
• Arrays & Strings → Searching, Sorting, Kadane’s Algorithm, Sliding Window, Prefix Sum.
• Linked List → Singly, Doubly, Circular, Reverse, Detect Cycle, Merge Two Lists.
• Stack & Queue → Implementations, Balanced Parentheses, Next Greater Element, Min Stack.
• Hashing → HashMap, HashSet, Frequency Counting, Subarray Problems.
• Recursion & Backtracking → Subsets, Subsequences, N-Queens, Sudoku Solver.
• Trees → Traversals, Height, Diameter, LCA, BST, Heaps, PriorityQueue.
• Graphs → BFS, DFS, Shortest Path (Dijkstra, Bellman-Ford, Floyd-Warshall), MST (Kruskal,
Prim).
• Advanced DS → Disjoint Set, Segment Tree, Fenwick Tree, Trie.
■ Phase 3 – Algorithms
• Greedy → Activity Selection, Huffman Coding, MST.
• Dynamic Programming → Fibonacci, Knapsack, LCS, LIS, Matrix Chain Multiplication, DP on
Trees/Graphs.
• Advanced → Divide & Conquer, KMP, Rabin-Karp, Z Algorithm, Binary Search on Answer,
Bitmask DP.
■ Phase 4 – Problem Solving & Competitive Programming
• LeetCode Top 150 Interview Questions.
• GeeksforGeeks DSA Must Do Problems.
• Codeforces Div3 Contests, AtCoder Beginner.
• Aim: Solve 500+ problems for mastery.
■ Phase 5 – System Design & Interview Prep
• Design Patterns in Java → Singleton, Factory, Observer, Builder.
• Low-Level Design → OOD problems.
• High-Level Design basics → Scaling, load balancing, caching.
■ Suggested Timeline (6 Months)
• Month 1 → Java Basics + Math + Arrays + Strings.
• Month 2 → Linked List + Stack + Queue + Hashing.
• Month 3 → Recursion + Trees.
• Month 4 → Graphs + Advanced DS.
• Month 5 → DP + Algorithms.
• Month 6+ → Problem Solving & Mock Interviews.
■ Final Tips
• Code everything yourself, don’t just read.
• Maintain GitHub repo for solutions.
• Be consistent → 2–3 problems daily = 700+ in a year.
• Use LeetCode (interview), Codeforces (speed), GFG (concepts).