Complete RoadMap of DSA in 120 ( 4 Month's ) Days
Complete RoadMap of DSA in 120 Days !!
Day −∞ to 0: Stick to a programming language like C++/Java/Python. Make sure that you are comfortable with pointers/objects.
Things to do:
- Things to Know in C++/Java/Python or any language.
→ User Input/Output.
→ Data Types
→ If Else statement
→ Switch Statement
→ Arrays , Strings
→ For Loop
→ While Loop
→ Function
→ Time Complexity - Build-up Logical Thinking.
→ Practice Pattern Questions from any source like Leetcode. - Learn STL/Java-Collections or similar thing in your language.
- Basic Maths.
→ Count Digits
→ Reverse a Number
→ Check Palindrome
→ GCD or HCF
→ Armstrong Number
→ Print all Divisors
→ Check for Prime - Learn Basic Recursion.
→ Understand recursion by print something N times
→ Print name N times using recursion
→ Print 1 to N using recursion
→ Print N to 1 using recursion
→ Sum of first N numbers
→ Factorial of N numbers
→ Reverse an array
→ Check if a string is palindrome or not
→ Fibonacci Number - Learn Basic Hashing.
→ Counting frequencies of array elements
→ Find the highest/lowest frequency element
Day 1 to 10: Sorting
Things to do:
- Selection Sort
- Bubble Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Cycle Sort
- Heap Sort
Day 11–25: Binary Search
Things to do:
- Binary Search on 1D Arrays
→ Binary Search to find X in Sorted Array
→ Lower Bound and Upper Bound
→ Search Insert Position
→ Check if Input array is sorted
→ Find the first and last occurrence of a given number in a sorted array
→ Count occurrence of a number in a sorted array with duplicates
→ Find peak element
→ Search in Rotated Sorted Array I
→ Search in Rotated Sorted Array II
→ Find minimum in Rotated Sorted Array
→ Single element in a sorted Array
→ Find kth element of two sorted arrays
→ Find out how many times has an array been rotated
→ Order-Agnostic Binary Search
- Binary Search on 2D Arrays
→ Search in a 2D matrix
→ Find Peak Element
→ Matrix Median - Find Answers by Binary Search in Search Space
→ Find square root of a number in log n
→ Find Nth root of a number using BS
→ Koko Eating Bananas
→ Minimum days to make M bouquets
→ Find the smallest Divisor
→ Capacity to Ship Packages within D Days
→ Median of two sorted arrays
→ Aggressive Cows
→ Book Allocation Problem
→ Split array-Largest Sum
→ Kth Missing Positive number
→ Minimize Max Distance to Gas Station
→ Median of 2 sorted arrays
→ Kth element of 2 sorted arrays
Day 26–30: Strings
Things to do:
- Basic
→ Remove outermost Paranthesis
→ Reverse words in a given string/Palindrome Check
→ Largest odd number in a string
→ Longest Common Prefix
→ Isomorphic String
→ check whether one string is a rotation of another
→ Check if two strings are anagram of each other - Medium String Problem
→ Sort Characters by frequency
→ Maximum Nesting Depth of Paranthesis
→ Roman Number to Integer and vice versa
→ Implement Atoi
→ Count Number of Substrings
→ Longest Palindromic Substring
→ Sum of Beauty of all substring
→ Reverse Every Word in A String
Day 31–41: LinkedList
Things to do:
- 1D LinkedList
- Doubly LinkedList
- Medium Level Problems of LL
→ Middle of a LinkedList
→ Reverse a LinkedList
→ Detect if linked list has a cycle in it
→ Find the starting point in LL
→ Length of Loop in LL
→ Check if LL is palindrome or not
→ Segregate odd and even nodes in LL
→ Remove Nth node from the back of the LL
→ Delete the middle node of LL
→ Sort LL
→ Sort a LL of 0’s and 1’s by changing links
→ Find the intersection point of Y LL
→ Add 1 to a number represented by LL
→ Add two numbers in LL - Medium Level Problems of DLL
→Delete all occurrences of a key in DLL
→ Find pairs with given sum in DLL
→ Remove duplicates from sorted DLL - Hard Level Problems of LL
→ Reverse LL in group of given size K
→Rotate a LL
→ Flattening of LL
→ Clone a LinkedList with random and next pointer
Day 42–62: Recursion
Things to do:
- Get a Strong Hold
→ Recursive Implementation of atoi()
→ Pow(x,n)
→ Count Good numbers
→ Sort a stack using recursion
→ Reverse a stack using recursion - Subsequences Pattern
→ Generate all binary strings
→ Generate Paranthesis
→ Print all subsequences/Power Set
→ Learn All Patterns of Subsequences
→ Count all subsequences with sum K
→ Combination Sum
→ Combination Sum-II
→ Subset Sum-I
→ Subset Sum-II
→ Combination Sum — III
→ Letter Combinations of a Phone number - Hard Level
→ Palindrome Partitioning
→ Word Search
→ N Queen
→ Rat in a Maze
→ Word Break
→ M Coloring Problem
→ Sudoku Solver
→ Expression Add Operators
Day 63–65: Bit Manipulation
Things to do:
- Basic
→ Introduction to Bit Manipulation
→ Check if the i-th bit is set or not
→ Check if a number is odd or not
→ Check if a number is power of 2 or not
→ Count the number of set bits
→ Set/Unset the rightmost unset bit
→ Swap two numbers
→ Divide two integers without using multiplication, division and mod operator - Interview Problems
→ Count number of bits to be flipped to convert A to B
→ Find the number that appears odd number of times
→ Power Set
→ Find xor of numbers from L to R
→ Find the two numbers appearing odd number of times - Advanced Maths
→ Print Prime Factors of a Number
→ All Divisors of a Number
→ Sieve of Eratosthenes
→ Find Prime Factorization of a Number using Sieve
→ Power(n, x)
Day 65–75: Stack and Queues
Things to do:
- Learning
→ Implement Stacks using Arrays
→ Implement Queue using Arrays
→ Implement Stack using Queue
→ Implement Queue using Stack
→ Implement stacks using Linkedlist
→ Implement Queue using Linkedlist
→ Check for balanced parenthesis
→ Implement Min Stack - Prefix , Infix , Postfix Conversion Problems
→ Infix to postfix Conversion using stack
→ Prefix to Infix Conversion
→ Prefix to Postfix Conversion
→ Postfix to Prefix Conversion
→ Postfix to Infix
→ Convert Infix to Prefix Notation - Monotonic Stack/Queue Problems **
→ Next Greater Element
→ Next Greater Element 2
→ Next Smaller Element
→ Number of NGEs to the right
→ Trapping Rainwater
→ Sum of subarray minimum
→ Stock span problem
→ Asteroid Collision
→ Sum of subarray ranges
→ Remove k Digits
→ Largest rectangle in a histogram
→ Maximal Rectangles - Implementation Problems
→ Sliding Window maximum
→ Stock Span Problem
→ The Celebrity Problem
→ Rotten Oranges
→ LRU cache
→ LFU cache
Day 75–85: Greedy Algorithms
Things to do:
- Practice -link
Day 86–101: Binary Tree
Things to do:
- Basic
→ Basic tree structure
→ Traversing a Binary Tree (Preorder, Postorder , Inorder)
→ Balanced Binary Search Tree - Problems
→ Find height or depth of a binary tree
→ Finding Diameter of a Tree using height of each node
→Find number of Universal Value subtrees in a Binary Tree
→ Find if a given Binary Tree is a Sub-Tree of another Binary Tree
→ Finding nodes at distance K from a given node
→ Copy a binary tree where each node has a random pointer
→ Zigzag Traversal of Binary Tree
→ Check if Binary Tree is foldable
→ Threaded Binary Tree
→ Convert Binary Tree to Threaded Binary Tree
→ Sum of k smallest elements in Binary Search Tree
Day 102–111: Graphs
Things to do:
- BFS/DFS
- Shortest path Algo
- Minimum spanning tree
- Union-Find
Refer : link
Day 112–120: Dynamic Programming
Things to do:
- Basic
→ link - Problems
→ Climbing Stairs
→ Best Time to Buy and Sell Stock
→ Maximum Subarray
→ House Robber - Hard Problems
→ Link
Comments
Post a Comment