Author - Santhosh Pandi🦊
The structure for this DSA learning roadmap was inspired by an Instagram reel. Unfortunately, I am unable to credit the original creator, as the source is unknown. All credit for the learning path goes to them.
The programs, designs, and implementations in this repository were created by me.
Learn
- Time Complexity and Space Complexity
- Big-O Notation
Practice
- Analyze the time complexity of simple programs.
Resources
- "Introduction to Algorithms" by Cormen (Chapter 1 on complexity)
- Online videos on Big-O
Topics Basics
-
Sliding window
-
Two-pointer techniques
Problems
- Find the maximum sum subarray (Kadane's Algorithm)
- Two Sum Problem
- Longest Substring Without Repeating Characters
Practice Sites
-
LeetCode
-
HackerRank
-
GeeksforGeeks
Learn
- Bubble, Selection, Insertion, Merge, Quick Sort
Practice
- Implement sorting algorithms and understand time complexity.
- Focus on Merge Sort and Quick Sort.
Topics
- Singly, Doubly, and Circular Linked Lists
Problems
-
Reverse a Linked List
-
Detect a Cycle in a Linked List (Floyd's Algorithm) Merge Two Sorted Linked Lists
Focus
Explore recursion, stacks, queues, and hashmaps.
- Basics of recursion, its stack behavior.
Problems
- Factorial, Fibonacci numbers
- Subset Sum Problem, N-Queens Problem
Topics
- Implement stacks and queues using arrays and linked lists.
Problems
- Next Greater Element
- Valid Parentheses
- Implement a Queue using Two Stacks
Learn
- Use cases, collision handling.
Problems
- Two Sum (using hashmaps)
- Subarray Sum Equals K
- Longest Consecutive Sequence
- Solve 5-10 problems covering arrays, strings, and hashmaps.
Focus
Trees, graphs, and advanced algorithms.
Topics
-
Binary Search Trees
-
Avl Tree (Self Balancing BST)
Problems
- Inorder, Preorder, Postorder Traversals
- Lowest Common Ancestor (LCA)
- Validate a Binary Search Tree
Resources
- visualgo.net
- Geeks for Geeks
Topics
- BFS
- DFS
- Adjacency list/matrix representations
Problems
-
Detect a Cycle in a Graph
-
Shortest Path in an Unweighted Graph (BFS)
-
Connected Components in a Graph
- Concept and real-world examples
Problems
-
Activity Selection Problem
-
Minimum Number of Platforms
-
Huffman Encoding
Focus
Dynamic Programming (DP) and revision.
Topics
- Understand memoization and tabulation.
Problems
-
Fibonacci (Top-Down and Bottom-Up).
-
0/1 Knapsack Problem.
-
Longest Increasing Subsequence.
- Revise all major topics and solve problems from past contests.
Mock Contests
- Attempt 1-2 timed contests on LeetCode or Codeforces.
Revise
- Your notes, formulas, and common patterns.
Practice
- Problems that were challenging for you earlier.