Welcome to the 30-Day DSA Mastery Plan! This roadmap is designed to help you master Data Structures and Algorithms and prepare for coding interviews. Follow this daily plan to build a solid foundation and tackle challenging problems.
- Topics to Cover:
- Array basics, operations (insertion, deletion, searching)
- Practice Problems:
- Easy: Two Sum
- Medium: Maximum Subarray
- Hard: Trapping Rain Water
- Topics to Cover:
- Two-pointer technique, sliding window technique
- Practice Problems:
- Easy: Reverse a String
- Medium: Longest Substring Without Repeating Characters
- Hard: Minimum Window Substring
- Topics to Cover:
- String manipulation techniques
- Practice Problems:
- Easy: Valid Anagram
- Medium: Longest Palindromic Substring
- Hard: Regular Expression Matching
- Topics to Cover:
- Singly-linked list operations (insertion, deletion, reversal)
- Practice Problems:
- Easy: Reverse a Linked List
- Medium: Merge Two Sorted Lists
- Hard: Reverse Nodes in k-Group
- Topics to Cover:
- Doubly linked list, circular linked list
- Practice Problems:
- Easy: Remove Nth Node From End of List
- Medium: Add Two Numbers (Linked List)
- Hard: Merge k Sorted Lists
- Topics to Cover:
- Stack operations (push, pop, top)
- Practice Problems:
- Easy: Valid Parentheses
- Medium: Implement Stack using Queues
- Hard: Daily Temperatures
- Topics to Cover:
- Queue operations (enqueue, dequeue)
- Practice Problems:
- Easy: Implement Queue using Stacks
- Medium: Evaluate Reverse Polish Notation
- Hard: Simplify Path
- Topics to Cover:
- Binary Trees, Binary Search Trees (BST)
- Tree traversal (preorder, inorder, postorder, level order)
- Practice Problems:
- Easy: Invert Binary Tree
- Medium: Validate Binary Search Tree
- Hard: Binary Tree Maximum Path Sum
- Topics to Cover:
- Advanced tree traversal and operations
- Practice Problems:
- Easy: Symmetric Tree
- Medium: Serialize and Deserialize Binary Tree
- Hard: Recover Binary Search Tree
- Topics to Cover:
- Binary heaps (min-heap, max-heap)
- Practice Problems:
- Easy: Kth Largest Element in an Array
- Medium: Top K Frequent Elements
- Hard: Sliding Window Maximum
- Topics to Cover:
- Heap operations (insert, delete, extract-min/max)
- Practice Problems:
- Easy: Find Median from Data Stream
- Medium: Merge k Sorted Lists
- Hard: Minimum Cost to Connect Sticks
- Topics to Cover:
- Hashing concepts, hash functions, collision resolution
- Practice Problems:
- Easy: Two Sum (using hash map)
- Medium: Group Anagrams
- Hard: Most Frequent Subtree Sum
- Topics to Cover:
- Advanced hash table operations and applications
- Practice Problems:
- Easy: Subarray Sum Equals K
- Medium: Longest Consecutive Sequence
- Hard: Happy Number
- Activities:
- Review and revisit challenging problems from Week 1 and Week 2
- Topics to Cover:
- Bubble sort, insertion sort
- Practice Problems:
- Easy: Merge Intervals
- Medium: Sort Colors
- Hard: Largest Rectangle in Histogram
- Topics to Cover:
- Quick sort, merge sort
- Practice Problems:
- Easy: Search Insert Position
- Medium: Find Peak Element
- Hard: Median of Two Sorted Arrays
- Topics to Cover:
- Binary search, linear search
- Practice Problems:
- Easy: Binary Search
- Medium: Search in Rotated Sorted Array
- Hard: Find Minimum in Rotated Sorted Array
- Topics to Cover:
- Basics of recursion, tail recursion
- Practice Problems:
- Easy: Permutations
- Medium: Combination Sum
- Hard: N-Queens
- Topics to Cover:
- Backtracking (N-Queens, Sudoku solver)
- Practice Problems:
- Easy: Subsets
- Medium: Word Search
- Hard: Sudoku Solver
- Topics to Cover:
- Basic concept and techniques (merge sort, quick sort)
- Practice Problems:
- Easy: Median of Two Sorted Arrays
- Medium: Pow(x, n)
- Hard: Maximum Subarray
- Activities:
- Review and revisit challenging problems from Week 3
- Topics to Cover:
- Graph representations (adjacency list, adjacency matrix)
- Practice Problems:
- Easy: Number of Islands
- Medium: Clone Graph
- Hard: Word Ladder II
- Topics to Cover:
- Graph traversal algorithms (DFS, BFS)
- Shortest path algorithms (Dijkstra's, Bellman-Ford)
- Practice Problems:
- Easy: Course Schedule
- Medium: Minimum Height Trees
- Hard: Traveling Salesman Problem
- Topics to Cover:
- Basic concepts, memoization, tabulation
- Practice Problems:
- Easy: Climbing Stairs
- Medium: Longest Increasing Subsequence
- Hard: Edit Distance
- Topics to Cover:
- Common dynamic programming problems (knapsack, longest common subsequence)
- Practice Problems:
- Easy: Maximum Product Subarray
- Medium: Partition Equal Subset Sum
- Hard: Wildcard Matching
- Topics to Cover:
- Bit manipulation, greedy algorithms
- Practice Problems:
- Easy: Single Number
- Medium: Decode Ways
- Hard: N-Queens II
- Topics to Cover:
- Miscellaneous problems (trie, segment tree, disjoint set)
- Practice Problems:
- Easy: Implement Trie (Prefix Tree)
- Medium: Segment Tree (Range Sum Query)
- Hard: Minimum Spanning Tree
- Activities:
- Review and revisit challenging problems from Week 4
- Activities:
- Review topics and problems you found challenging
- Revisit and practice weak areas
- Activities:
- Conduct mock interviews with a friend or use online platforms
- Focus on communication and explaining your thought process
Happy coding and good luck with your interview preparation!
If you find this repository helpful, please consider giving it a ⭐ star. Your support helps encourage the improvement of this course and makes it more visible to others who might benefit from it.
If you'd like to use this repository on your local machine, follow these steps to fork it:
-
Fork the Repository:
- Go to the GitHub page of the repository you want to fork.
- Click the "Fork" button at the top right of the page.
-
Clone Your Forked Repository:
- After forking, you will have a copy of the repository in your GitHub account.
- Copy the URL of your forked repository. You can find this by navigating to your forked repository on GitHub and clicking the green "Code" button, then copying the URL provided.
Example URL:
https://github.com/YOUR_USERNAME/YOUR_FORK.git
-
Open your terminal and clone your forked repository using the following command:
git clone https://github.com/YOUR_USERNAME/YOUR_FORK.git
-
Navigate into the Project Directory:
-
Change into the directory of your cloned repository:
cd YOUR_FORK
-
-
Add the Original Repository as a Remote:
-
It’s a good practice to add the original repository as a remote to keep your fork up-to-date with the latest changes.
git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
Replace
ORIGINAL_OWNER
andORIGINAL_REPOSITORY
with the original repository's owner and name.
-
-
Pull Latest Changes from the Original Repository:
-
Before making changes, ensure you have the latest updates from the original repository:
git fetch upstream git checkout main git merge upstream/main
-
-
Make Changes and Commit:
-
Create a new branch for your changes:
git checkout -b your-branch-name
-
Make your changes and commit them:
git add . git commit -m "Description of your changes"
-
-
Push Your Changes:
-
Push your changes to your forked repository:
git push origin your-branch-name
-
-
Create a Pull Request:
Here's a summary of the commands you will use:
# Clone your forked repository
git clone https://github.com/YOUR_USERNAME/YOUR_FORK.git
# Navigate into the project directory
cd YOUR_FORK
# Add the original repository as a remote
git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
# Fetch and merge changes from the original repository
git fetch upstream
git checkout main
git merge upstream/main
# Create a new branch, make changes, and commit
git checkout -b your-branch-name
git add .
git commit -m "Description of your changes"
# Push changes to your fork and create a pull request
git push origin your-branch-name