30-Day DSA Learning Path

Week 1: Building the Foundation

Day 1: Java Fundamentals I

Morning Session:

  • Collections Framework deep dive
  • ArrayList vs LinkedList
  • HashSet vs TreeSet
  • HashMap vs TreeMap
  • Practice: Implement custom ArrayList

Evening Session:

  • 2 Problems:
  • LeetCode 217: Contains Duplicate
  • LeetCode 242: Valid Anagram

Day 2: Java Fundamentals II

Morning Session:

  • Exception handling mastery
  • File I/O operations
  • Generics in Java
  • Practice: Create generic data structure

Evening Session:

  • 2 Problems:
  • LeetCode 1: Two Sum
  • LeetCode 49: Group Anagrams

Day 3: Time Complexity

Morning Session:

  • Big O notation understanding
  • Best, average, worst cases
  • Analyzing different loops
  • Space complexity basics

Evening Session:

  • Analyze complexity of:
  • Different sorting algorithms
  • Common data structure operations
  • 2 Problems with multiple solutions:
  • LeetCode 704: Binary Search
  • LeetCode 33: Search in Rotated Sorted Array

Day 4: Advanced Complexity Analysis

Morning Session:

  • Amortized analysis
  • Master theorem
  • Recurrence relations
  • Log complexity understanding

Evening Session:

  • Analyze complex algorithms:
  • Quick Sort
  • Merge Sort
  • HeapSort
  • Create complexity comparison sheet

Day 5: Recursion Basics

Morning Session:

  • Understanding call stack
  • Base case identification
  • Recursive tree visualization
  • Memory usage in recursion

Evening Session:

  • 3 Problems:
  • LeetCode 509: Fibonacci Number
  • LeetCode 70: Climbing Stairs
  • LeetCode 21: Merge Two Sorted Lists

Day 6: Advanced Recursion

Morning Session:

  • Tail recursion optimization
  • Multiple recursion calls
  • Recursive vs Iterative solutions
  • Memory optimization techniques

Evening Session:

  • 3 Problems:
  • LeetCode 206: Reverse Linked List
  • LeetCode 98: Validate Binary Search Tree
  • LeetCode 22: Generate Parentheses

Day 7: Backtracking Introduction

Morning Session:

  • Backtracking framework
  • State space tree
  • Pruning techniques
  • Decision tree visualization

Evening Session:

  • 3 Problems:
  • LeetCode 46: Permutations
  • LeetCode 78: Subsets
  • LeetCode 39: Combination Sum

Week 2: Linear Data Structures

Day 8: Array Techniques I

Morning Session:

  • Array manipulation techniques
  • Two-pointer approach
  • Dutch national flag algorithm
  • Kadane’s algorithm

Evening Session:

  • 4 Problems:
  • LeetCode 283: Move Zeroes
  • LeetCode 75: Sort Colors
  • LeetCode 53: Maximum Subarray
  • LeetCode 121: Best Time to Buy and Sell Stock

Day 9: Array Techniques II

Morning Session:

  • 2D array operations
  • Matrix traversal patterns
  • Spiral traversal
  • Diagonal traversal

Evening Session:

  • 4 Problems:
  • LeetCode 54: Spiral Matrix
  • LeetCode 48: Rotate Image
  • LeetCode 74: Search a 2D Matrix
  • LeetCode 73: Set Matrix Zeroes

Day 10: Linked Lists I

Morning Session:

  • Singly linked list implementation
  • Basic operations
  • Insertion (start, end, middle)
  • Deletion (start, end, middle)
  • Traversal
  • Searching

Evening Session:

  • 4 Problems:
  • LeetCode 206: Reverse Linked List
  • LeetCode 21: Merge Two Sorted Lists
  • LeetCode 83: Remove Duplicates
  • LeetCode 141: Linked List Cycle

Day 11: Linked Lists II

Morning Session:

  • Doubly linked list implementation
  • Circular linked list
  • Two pointer technique in lists
  • Floyd’s cycle detection

Evening Session:

  • 4 Problems:
  • LeetCode 19: Remove Nth Node From End
  • LeetCode 142: Linked List Cycle II
  • LeetCode 160: Intersection of Two Lists
  • LeetCode 234: Palindrome Linked List

Day 12: Stacks

Morning Session:

  • Stack implementation using arrays
  • Stack implementation using linked list
  • Applications of stacks
  • Common patterns

Evening Session:

  • 4 Problems:
  • LeetCode 20: Valid Parentheses
  • LeetCode 155: Min Stack
  • LeetCode 84: Largest Rectangle in Histogram
  • LeetCode 394: Decode String

Day 13: Queues

Morning Session:

  • Queue implementation using arrays
  • Queue implementation using linked list
  • Circular queue
  • Priority queue basics

Evening Session:

  • 4 Problems:
  • LeetCode 225: Implement Stack using Queues
  • LeetCode 232: Implement Queue using Stacks
  • LeetCode 933: Number of Recent Calls
  • LeetCode 621: Task Scheduler

Day 14: Advanced Queue Applications

Morning Session:

  • Deque implementation
  • Priority queue deep dive
  • Queue in BFS
  • Monotonic queue

Evening Session:

  • 4 Problems:
  • LeetCode 239: Sliding Window Maximum
  • LeetCode 346: Moving Average from Data Stream
  • LeetCode 362: Design Hit Counter
  • LeetCode 353: Design Snake Game

Day 15: Binary Search I

Morning Session:

  • Binary search implementation
  • Finding exact matches
  • Finding insertion points
  • Handling duplicates

Evening Session:

  • 4 Problems:
  • LeetCode 704: Binary Search
  • LeetCode 35: Search Insert Position
  • LeetCode 34: Find First and Last Position
  • LeetCode 74: Search a 2D Matrix

Day 16: Binary Search II

Morning Session:

  • Advanced binary search patterns
  • Search in rotated array
  • Search in infinite array
  • Binary search on answers

Evening Session:

  • 4 Problems:
  • LeetCode 33: Search in Rotated Sorted Array
  • LeetCode 153: Find Minimum in Rotated Sorted Array
  • LeetCode 162: Find Peak Element
  • LeetCode 875: Koko Eating Bananas

Day 17: Sorting Algorithms I

Morning Session:

  • Bubble sort
  • Selection sort
  • Insertion sort
  • Analysis and comparison

Evening Session:

  • Implementation of all three sorts
  • 3 Problems:
  • LeetCode 912: Sort an Array
  • LeetCode 147: Insertion Sort List
  • LeetCode 976: Largest Perimeter Triangle

Day 18: Sorting Algorithms II

Morning Session:

  • Merge sort
  • Quick sort
  • Heap sort
  • Counting sort

Evening Session:

  • Implementation of advanced sorts
  • 3 Problems:
  • LeetCode 148: Sort List
  • LeetCode 215: Kth Largest Element
  • LeetCode 347: Top K Frequent Elements

Day 19: HashMap Implementation

Morning Session:

  • Hash function design
  • Collision resolution
  • Load factor and rehashing
  • Custom HashMap implementation

Evening Session:

  • 4 Problems:
  • LeetCode 1: Two Sum
  • LeetCode 387: First Unique Character
  • LeetCode 49: Group Anagrams
  • LeetCode 146: LRU Cache

Day 20: HashMap Applications

Morning Session:

  • Common HashMap patterns
  • Count map technique
  • Two-sum variations
  • HashMap with custom objects

Evening Session:

  • 4 Problems:
  • LeetCode 560: Subarray Sum Equals K
  • LeetCode 128: Longest Consecutive Sequence
  • LeetCode 380: Insert Delete GetRandom O(1)
  • LeetCode 138: Copy List with Random Pointer

Day 21: Trees I

Morning Session:

  • Binary tree implementation
  • Tree traversals
  • Inorder
  • Preorder
  • Postorder
  • Level order traversal

Evening Session:

  • 4 Problems:
  • LeetCode 94: Binary Tree Inorder Traversal
  • LeetCode 102: Level Order Traversal
  • LeetCode 104: Maximum Depth
  • LeetCode 101: Symmetric Tree

Day 22: Trees II

Morning Session:

  • Binary Search Tree implementation
  • BST operations
  • BST validation
  • Self-balancing introduction

Evening Session:

  • 4 Problems:
  • LeetCode 98: Validate Binary Search Tree
  • LeetCode 235: Lowest Common Ancestor of BST
  • LeetCode 230: Kth Smallest Element in BST
  • LeetCode 108: Convert Sorted Array to BST

Day 23: Heaps I

Morning Session:

  • Heap implementation
  • Max heap operations
  • Min heap operations
  • Heapify process

Evening Session:

  • 4 Problems:
  • LeetCode 215: Kth Largest Element
  • LeetCode 347: Top K Frequent Elements
  • LeetCode 1046: Last Stone Weight
  • LeetCode 703: Kth Largest Element in Stream

Day 24: Heaps II

Morning Session:

  • Priority queue with comparator
  • Heap sort implementation
  • K-way merge
  • Median maintenance

Evening Session:

  • 4 Problems:
  • LeetCode 295: Find Median from Data Stream
  • LeetCode 767: Reorganize String
  • LeetCode 373: Find K Pairs with Smallest Sums
  • LeetCode 218: The Skyline Problem

Day 25: Tries

Morning Session:

  • Trie implementation
  • Insert and search operations
  • Pattern matching
  • Prefix matching

Evening Session:

  • 4 Problems:
  • LeetCode 208: Implement Trie
  • LeetCode 14: Longest Common Prefix
  • LeetCode 211: Design Add and Search Words
  • LeetCode 212: Word Search II

Day 26: Graphs I

Morning Session:

  • Graph representations
  • DFS implementation
  • BFS implementation
  • Connected components

Evening Session:

  • 4 Problems:
  • LeetCode 200: Number of Islands
  • LeetCode 133: Clone Graph
  • LeetCode 547: Number of Provinces
  • LeetCode 695: Max Area of Island

Day 27: Graphs II

Morning Session:

  • Shortest path algorithms
  • Dijkstra’s algorithm
  • Topological sort
  • Cycle detection

Evening Session:

  • 4 Problems:
  • LeetCode 207: Course Schedule
  • LeetCode 210: Course Schedule II
  • LeetCode 743: Network Delay Time
  • LeetCode 787: Cheapest Flights Within K Stops

Day 28: Dynamic Programming I

Morning Session:

  • DP fundamentals
  • Memoization technique
  • Tabulation technique
  • State transition

Evening Session:

  • 4 Problems:
  • LeetCode 70: Climbing Stairs
  • LeetCode 198: House Robber
  • LeetCode 322: Coin Change
  • LeetCode 300: Longest Increasing Subsequence

Day 29: Dynamic Programming II

Morning Session:

  • 2D DP problems
  • Grid based DP
  • String DP
  • State compression

Evening Session:

  • 4 Problems:
  • LeetCode 1143: Longest Common Subsequence
  • LeetCode 72: Edit Distance
  • LeetCode 518: Coin Change 2
  • LeetCode 115: Distinct Subsequences

Day 30: Final Integration

Morning Session:

  • Bit manipulation basics
  • Number theory fundamentals
  • System design basics
  • Advanced OOP concepts

Evening Session:

  • Mixed Practice:
  • LeetCode 191: Number of 1 Bits
  • LeetCode 295: Find Median from Data Stream
  • LeetCode 146: LRU Cache
  • System Design: Design a URL shortener

Daily Schedule Template

Morning (2.5 hours):

  • Theory Study (1 hour)
  • Read documentation
  • Watch related videos
  • Take notes
  • Implementation Practice (1.5 hours)
  • Code basic implementations
  • Test edge cases
  • Optimize solutions

Afternoon (2 hours):

  • Problem Solving
  • 1 Easy problem (20 mins)
  • 1 Medium problem (40 mins)
  • 1 Hard problem (60 mins)

Evening (1.5 hours):

  • Review & Revision
  • Review day’s concepts
  • Optimize solutions
  • Document learnings

Success Tips

  1. Code Implementation:
  • Always write complete, compilable code
  • Test with multiple test cases
  • Consider edge cases
  • Focus on clean, readable code
  1. Problem Solving Approach:
  • First 5 minutes: Understand problem
  • Next 5 minutes: Think of approaches
  • Next 20 minutes: Implement solution
  • Last 5 minutes: Test and optimize
  1. Learning Methods:
  • Implement from scratch
  • Draw/visualize concepts
  • Explain to others
  • Write blog posts
  1. Practice Habits:
  • Time your problem solving
  • Use a whiteboard
  • Practice speaking thoughts
  • Review others’ solutions

Progress Tracking

Create a GitHub repository with:

  1. Daily implementations
  2. Problem solutions
  3. Notes and learnings
  4. Complexity analysis
  5. Alternative approaches

Additional Resources

  1. Video Resources:
  • MIT OpenCourseWare
  • Tushar Roy’s channel
  • Back To Back SWE
  • Abdul Bari
  1. Practice Platforms:
  • LeetCode Premium (for company-specific questions)
  • AlgoExpert
  • InterviewBit
  • Codeforces
  1. Books:
  • “Introduction to Algorithms” (CLRS)
  • “Algorithms” by Robert Sedgewick
  • “Elements of Programming Interviews”
  • “Grokking Algorithms”

Weekly Assessments

End of each week:

  1. Solve 5 random problems
  2. Review week’s concepts
  3. Mock interview
  4. Update study tracker
Team
Team

This account on Doubtly.in is managed by the core team of Doubtly.

Articles: 483