DSA SHEET
Array-
Number of Good Pairs
How Many Numbers Are Smaller Than the Current Number
Two Sum
Remove Duplicates from Sorted Array
Missing Number
Majority Element
Sort Colors
Maximum Subarray
Set Matrix Zeroes
Container With Most Water
Search a 2D Matrix
Reverse Pairs
SLIDING WINDOW
Minimum Size Subarray Sum
Max Consecutive Ones III
Minimum Operations to Reduce X to Zero
Minimum Window Substring
Frequency of the Most Frequent Element
TWO POINTERS
Sum of Square Numbers
Number of Subsequences That Satisfy the Given Sum Condition
Minimize Maximum Pair Sum in Array
Trapping Rain Water
STRINGS
Valid Anagram
Isomorphic Strings
Longest Common Prefix
Reverse Words in a String
Group Anagrams
Sum of Beauty of All Substrings
Longest Substring Without Repeating Characters
Longest Palindromic Substring
String to Integer (atoi)
Minimum Window Substring
LINKED LIST
Palindrome Linked List
Intersection of Two Linked Lists
LRU Cache
Add Two Numbers
Rotate List
Reorder List
Linked List Cycle II
Rearrange a Linked List in Zig-Zag fashion
Flattening a Linked List
Reverse Nodes in k-Group
STACK AND QUEUE
Implement Stack using Queues
Next Greater Element I
Valid Parentheses
Next Greater Element II
Asteroid Collision
Remove K Digits
Sliding Window Maximum
Recursion and BackTracking
Fibonacci Number
Pow(x, n)
Power of Three
Combination Sum
Subsets
Coin Change
Elimination Game
Rat in a Maze Problem - I
Word Break
N-Queens
Sudoku Solver
tug-of-war
DYANMIC PROGRAMMING
Fibonacci Number
Climbing Stairs
Counting Bits
Cherry Pickup II
Count of subsets with sum equal to X
Longest Common Subsequence
Longest Palindromic Subsequence
Minimum number of deletions and insertions
Best Time to Buy and Sell Stock II
Burst Balloons
BINARY TREE & BINARY SEARCH TREE
Binary Tree Preorder Traversal
Binary Tree Inorder Traversal
Binary Tree Level Order Traversal
Vertical Order Traversal of a Binary Tree
Top View of Binary Tree
Binary Tree Right Side View
Left View of Binary Tree
Bottom View of Binary Tree
Burning Tree
Kth Smallest Element in a BST
Largest BST in a Binary Tree
Binary Tree Maximum Path Sum
Serialize and Deserialize Binary Tree
Lowest Common Ancestor of a Binary Search Tree
Two Sum IV - Input is a BST
Replace every element with the least greater element on its right
GRAPH
DFS of Graph
BFS of graph
Number of Triangles
Rotting Oranges
Course Schedule
Course Schedule II
Word Ladder
Word Ladder II
Alien Dictionary
Cheapest Flights Within K Stops
Find the City With the Smallest Number of Neighbors at a Threshold Distance
Accounts Merge
BIT MANIPULATION
Count set bits in an integer
Power of Two
Single Number
Find position of the only set bit
Count number of bits to be flipped to convert A to B
Find XOR of numbers from L to R.
Calculate square of a number without using *, / and pow()
Divide two integers without using multiplication, division and mod operator
Subsets
Count Primes
BINARY SEARCH
Binary Search
Search Insert Position
Sqrt(x) USING BS
Search in Rotated Sorted Array
Find First and Last Position of Element in Sorted Array
Find Minimum in Rotated Sorted Array
Find Peak Element
Search a 2D Matrix
Find a Peak Element II
Capacity To Ship Packages Within D Days
Painter's Partition Problem
Minimize Max Distance to Gas Station
Allocate Books
Aggressive Cows