Dsa Sheet
Dsa Sheet
Count Digits
Reverse a Number
Check Palindrome
GCD Or HCF
Armstrong Numbers
Print all Divisors
Check for Prime
BASIC RECURSION
SORTING
Selection Sort
Bubble Sort
Insertion Sort
Merge Sort
Recursive Bubble Sort
Recursive Insertion Sort
Quick Sort
ARRAY
Largest Element in an Array
Second Largest Element in an Array without sorting
Check if the array is sorted
Remove duplicates from Sorted array
Left Rotate an array by one place
Left rotate an array by D places
Move Zeros to end
Linear Search
Find the Union and intersection of two sorted arrays
Find missing number in an array
Maximum Consecutive Ones
Find the number that appears once, and other numbers twice.
Longest subarray with given sum(Positives)
Longest subarray with given sum(Positives + Negatives)
2Sum Problem
Sort an array of 0’s 1’s and 2’s
Majority Element (>n/2 times)
Kadane’s Algorithm, maximum subarray sum
Print the subarray with maximum sum
Stock Buy and Sell
Rearrange the array in alternating positive and negative items
Next Permutation
Leaders in an Array problem
Longest Consecutive Sequence in an Array
Set Matrix Zeros
Rotate Matrix by 90 degrees
Print the matrix in spiral manner
Find number of subarrays with sum K
Pascal’s Triangle
Majority Element (n/3 times)
3-Sum Problem
4-Sum Problem
Count number of subarrays with given xor K
Merge Overlapping Subintervals
Merge two sorted arrays without extra space
Find the repeating and missing number
Count Inversions
Reverse Pairs
Maximum Product Subarray
Search in a 2 D matrix
Find Peak Element
Matrix Median
STRINGS
LINKED LIST--
Step 6.5
: Hard Problems of LL
RECURSION
Palindrome Partitioning
Word Search
N Queen
Rat in a Maze
Word Break
M Coloring Problem
Sudoko Solver
Expression Add Operators
Step 8
: Bit Manipulation [Concepts & Problems] & Advanced Maths
Step 8.2
: Interview Problems
Step 11
: Heaps [Learning, Medium, Hard Problems]
Step 11.1
Design twitter
Connect `n` ropes with minimal cost
Kth largest element in a stream of running integers
Maximum Sum Combination
Find Median from Data Stream
K most frequent elements
Step 12
: Greedy Algorithms [Easy, Medium/Hard]
Step 12.1
: Easy Problems
Assign Cookies
Fractional Knapsack Problem
Greedy algorithm to find minimum number of coins
Lemonade Change
Valid Paranthesis Checker
Step 12.2
: Medium/Hard
N meetings in one room
Jump Game
Jump Game 2
Minimum number of platforms required for a railway
Job sequencing Problem
Candy
Program for Shortest Job First (or SJF) CPU Scheduling
Program for Least Recently Used (LRU) Page Replacement Algorithm
Insert Interval
Merge Intervals
Non-overlapping Intervals
TREES
Step 13
Step 13.1
: Traversals
Introduction to Trees
Binary Tree Representation in C++
Binary Tree Representation in Java
Binary Tree Traversals in Binary Tree
Preorder Traversal of Binary Tree
Inorder Traversal of Binary Tree
Post-order Traversal of Binary Tree
Level order Traversal / Level order traversal in spiral form
Iterative Preorder Traversal of Binary Tree
Iterative Inorder Traversal of Binary Tree
Post-order Traversal of Binary Tree using 2 stack
Post-order Traversal of Binary Tree using 1 stack
Preorder, Inorder, and Postorder Traversal in one Traversal
Step 13.2
: Medium Problems
: Concepts
Step 15.1
Topo Sort
Kahn’s Algorithm
Cycle Detection in Directed Graph (BFS)
Course Schedule – I
Course Schedule – II
Find eventual safe states
Alien dictionary
Step 15.4
: Shortest Path Algorithms and Problems
Step 15.5
: MinimumSpanningTree/Disjoint Set and Problems
Bridges in Graph
Articulation Point
Kosaraju’s Algorithm
Step 16