Complete RoadMap of DSA in 120 Days !!
Day 0: Stick to a programming language like c++/Java/Python. Make sure that you are comfortable with pointers/objects.
👉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.
> Practise Pattern Questions from any source like Leetcode.
👉 Learn STL/Java collections or similar things 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 printing 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
-> Selection Sort
-> Bubble Sort
-> Insertion Sort
-> Merge Sort
-> Quick Sort
-> Cycle Sort
-> Heap Sort
Day 11-25: Binay Search
> Binary Search to find X in Sorted Array
> Lower Bound and Upper Bound\
> Search Insert Position
> Check if the Input array is sorted
> Find the first and last occurrence of a given number in a sorted array
> Count the occurrence of a number in a sorted array with duplicates
> Find peak element
> Search in Rotated Sorted Array 1
> Search in Rotated Sorted Array 2
> Find Minimum in Rotated Sorted Array
> Single element in a sorted Array
> Find the kth element of two sorted arrays
> Find out how many times has an array been rotated
> Order-Agnostic Binary Search
> Search in a 2D matrix
> Find Peak Element
> Matrix Median
> Find the square root of a number in log n
> Find the Nth root of a number using BS
> Koko Eating Bananas
> Minimum days to make M bouquets
> Find the smallest Division
> 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 the gas station
> Median of 2 sorted arrays
> kth element of 2 sorted arrays
Day 26-30: String
Things to do:
👉 Basic
> Remove outermost Parenthesis
> Reverse words in a given string 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 anagrams of each other
👉 Medium string problem
> Sort characters by frequency
> Maximum nesting depth of parenthesis
> Roman number to integer and vice versa
> Implement Atoi
> Count the Number of Substrings
> Longest palindromic substring
> Sum of the beauty of all substring
> Reverse Every word in a string
Day 3141: Linked List
> Middle of a LinkedList
> Reverse a LinkedList
> Detect if LinkedList 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 the Nth node from the back of the LL
> Delete the middle node of the 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 a 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 set
> Learn All Patterns of Subsequences
> Count all subsequences with sum K
> Combination sum
> Combination sum-2
> Subset sum -1
> Subset sum -2
> Combination sum - 3
> Letter combination 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-35 : 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 modoperator
👉 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 Numbers
> 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 Queues
> Implement Queue using Stack
> Implement Stacks using Linkedlist
> Implement Queue using 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
> Nest Smaller Element
> Number fo 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
> 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
> Treaded 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 spannning tree
👉 Union-Find
Day 112-120: Dynamic Programming
Things to do :
👉 Basic
> link
👉 Problems
> Best Time to Buy and Sell stock
👉 Hard Problems
> Link
Comments
Post a Comment