Array and Matrix Questions 🧮
- LeetCode 74. Search a 2D Matrix
- LeetCode 33. Search in Rotated Sorted Array
- LeetCode 2643. Row With Maximum Ones
- LeetCode 1283. Find the Smallest Divisor Given a Threshold
- GFG Missing number in array
Bit Manipulation ⚙️
- LeetCode 136. Single Number
- LeetCode 137. Single Number II
- LeetCode 137. Single Number III
- LeetCode 338. Counting Bits
- LeetCode 191. Number of 1 Bits
- GFG Check whether K-th bit is set or not
- GFG Get the position of rightmost unset bit
- GFG Find first set bit
- GFG Set the rightmost unset bit
- GFG Xoring and Clearing
- GFG K-th Bit is Set or Not
- GFG Count Total Setbits
Stack Questions 📚
- LeetCode Largest Rectangle in Histogram
- LeetCode Valid Parentheses
- LeetCode Implement Min Stack
- GFG Implement Stack Using Array
- GFG Implement 2 Stacks in an Array
- GFG Parenthesis Checker
- GFG Next Greater Element
Linked List Questions 🔗
- LeetCode Middle of the Linked List
- LeetCode Add Two Numbers Linked list
- LeetCode Reverse Linked List
- LeetCode Swapping Nodes in a Linked List
- LeetCode Palindrome Linked List
- LeetCode Intersection of two Linked Lists
- LeetCode Remove Nth Node from End of Linked List
- GFG Search in Linked List
- GFG Add 1 to a number represented as linked list
Binary Search Tree (BST) Questions 🌳
- LeetCode Validate a BST
- LeetCode Max Depth of a Binary Tree
- LeetCode Level Order Traversal
- LeetCode Zig-Zag Traversal
- LeetCode Insert a node into BST
- LeetCode Lowest Common Ancestor in a BST
- GFG Level Order of binary tree
- GFG Top view of binary tree
- GFG Bottom view of binary tree
- Delete Node in a BST
- Balance a Binary Search Tree
- Lowest common ancestor of a binary tree
Tree Traversal 🌲
- LeetCode Preorder Traversal
- LeetCode Inorder Traversal
- LeetCode Postorder Traversal
Mathematics and Logic 🧠
- LeetCode 204. Count Primes
- LeetCode Greatest Common Divisor
- GFG/LeetCode Sieve of Eratosthenes
- GFG Countprime in range
Dynamic Programming 📝
- LeetCode Unique Paths
- LeetCode Unique Paths-2
- LeetCode Climb Stairs
- 322. Coin Change
- 120. Triangle
- 64. Minimum Path Sum
- house robber I
- house robber II
- Coin Change I
- Coin Change II
- Minimun Cost Homecoming of Robot in a grid
- Edit Distance
- Best Time to Buy and Sell Stock II
- Best Time to Buy and Sell Stock III
- Best Time to Buy and Sell Stock IV
- 714. Best Time to Buy and Sell Stock with Transaction Fee
- 309. Best Time to Buy and Sell Stock with Cooldown
Recursion and Backtracking 🔄
- LeetCode Print Maze Paths
- LeetCode Print All Subsequences
Sorting Algorithms 🌀
- GFG Merge sort
- GFG Quick sort
- GFG Selection sort
Miscellaneous 🌐
- LeetCode Maximal Rectangle
- GFG Aggressive Cows
- Largest Subarray with 0 Sum
- Kth Smallest Element
- Top K Frequent Elements
- Find K Closest Elements
- Min Cost To connect ropes
Notes on Time and Space Complexity ⏲️
- Merge Sort: Time O(nlogn), Space O(n)
- Quick Sort: Time O(nlogn) on average, Space O(logn)
- Selection Sort: Time O(n^2), Space O(1)
- Insertion Sort: Time O(n^2), Space O(1)
- Bubble Sort: Time O(n^2), Space O(1)
- Heap Sort: Time O(nlogn), Space O(1)
- Counting Sort: Time O(n+k), Space O(k)
- Radix Sort: Time O(nk), Space O(n+k)
- Bucket Sort: Time O(n+k), Space O(n)
- Shell Sort: Time O(nlogn), Space O(1)