- Find all prime nos from 1 to N Given a number find if it's prime
- Calculate X^Y in log(Y) time (binary_exponation)
- Find all prime factors of a number N
- Calculate NCR value for given N and R Read and implement the
- problems for all catalan number variations taught in class
- Unique Binary Search Trees
- Single Number
- Single Number II
- Majority Element
- Bitwise AND of Numbers Range
- Counting Bits
- Hamming Distance
- Decode XORed Permutation
- Selection sort
- Bubble Sort
- Merge Sort
- Quick Sort
- Insertion Sort
- Counting Sort
- Radix sort
- Maximum Gap
- Bucket Sort
- Kth Largest Element in an Array
- Sort Colors
- Largest sum contiguous subarray
- Merge 2 sorted arrays without using extra space
- Merge Intervals
- Next Permutation
- Counting inversion
- Best Time to Buy and Sell Stock
- Given array of size N and number K, find all elements that appear more than N/K times
- Trapping Rain Water
- Chocolate distribution problem
- Median of Two Sorted Arrays
- Two Sum
- 3Sum
- Search in Rotated Sorted Array
- Find Median from Data Stream
- Range sum query
- Sort a K-sorted array
- Sort an array in wave form
- 4Sum
- 4Sum II
- Closest Subsequence Sum (Leetcode 1755)
- Partition Array Into Two Arrays to Minimize Sum Difference
- Implement Stack using Queues
- Implement Queue using Stacks
- Valid Parentheses
- Next Greater Element I
- Find next smaller element
- Find previous greater element
- Find previous smaller element
- Design stack which supports getmin in O(1) time and space (Read editorial)
- Largest Rectangle in Histogram
- LRU Cache
- Rotting Oranges
- Reverse a stack without using extra space
- Basic calculator(224)
- Basic calculator 2 (227)
- car fleet 1
- Spiral Traversal/Rotation of matrix
- Median in row-wise sorted matrix
- Maximum size rectangle (Discussed in hashmap)
- Rotate matrix by 90 degrees
- Kth smallest element in a row-wise column-wise sorted matrix
- Design HashMap
- 4Sum
- Valid Sudoku
- Sudoku Solver
- Group Anagrams
- Maximal Rectangle
- Top K Frequent Elements
- Insert Delete GetRandom O(1)
- First Unique Character in a String
- Find All Anagrams in a String
- Sort Characters By Frequency
- Contiguous Array
- Subarray Sum Equals K
- Vertical Order Traversal of a Binary Tree
- Longest Duplicate Substring
- Copy List with Random Pointer
- Longest Substring Without Repeating Characters
- Merge k Sorted Lists
- Sliding Window Maximum
- Find Median from Data Stream
- Top K Frequent Elements
- Sort Characters By Frequency
- Kth Largest Element in a Stream
- Process Tasks Using Servers
- Reverse a linkedList (Iterative and recursive)
- Reverse LinkedList in blocks of size K
- Loop detection in LinkedList
- Find intersection node or starting node of a loop in linkedList
- Remove Duplicates in LinkedList
- Add 2 linkedLists represented as numbers
- Sort a LinkedList (merge sort)
- Check if a LinkedList is palindrome
- Flatten a linkedList
- Multiply 2 nos represented as LinkedList
- Josephus circle using circular linkedList
- N-Queens
- N-Queens II
- Generate Parentheses
- Letter Combinations of a Phone Number
- Word Search
- Word Search II
- Word Break II
- Regular Expression Matching
- Sudoku Solver
- Permutations
- Combination Sum
- The Maze
- Remove Invalid Parentheses
- Implement Huffman algo (Use Editorial and our class lecture)
- Meeting Rooms II
- Employee Free Time
- Task Scheduler
- Reorganize String
- Minimum Number of Taps to Open to Water a Garden
- Gas Station
- Minimum Deletion Cost to Avoid Repeating Letters
- Best Time to Buy and Sell Stock II
- Jump Game II
- Maximum Number of Events That Can Be Attended
- Partition Labels
- Two City Scheduling
- Jump Game
- Lowest Common Ancestor of a Binary Tree
- Binary Tree Maximum Path Sum
- Binary Tree Right Side View
- Serialize and Deserialize Binary Tree
- All Nodes Distance K in Binary Tree
- Count Good Nodes in Binary Tree
- Lowest Common Ancestor of a Binary Tree III
- Validate Binary Search Tree
- Vertical Order Traversal of a Binary Tree
- Convert Binary Search Tree to Sorted Doubly Linked List
- Diameter of Binary Tree
- Binary Tree Zigzag Level Order Traversal
- Invert Binary Tree
- Balance a Binary Search Tree
- Binary Tree Level Order Traversal
- Flatten Binary Tree to Linked List
- Construct Binary Tree from Preorder and Inorder Traversal
- Symmetric Tree
- Unique Binary Search Trees
- Cousins in Binary Tree
- Construct Binary Search Tree from Preorder Traversal
- Inorder Successor in BST
- Implement Trie (Prefix Tree)
- Implement Trie II (Prefix Tree)
- Design Add and Search Words Data Structure
- Count number of strings with given prefix
- Maximum XOR of 2 numbers in an array
- Word Break
- Word Break II
- Range sum query
- Range max/min query
- Range XOR query
- Range GCD query
- Range LCM query
- Count of number of Zeroes in a given range
- Find Kth zero in array (segment tree)
- Course Schedule II (Topological Sort)
- Course Schedule (Cycle Detection)
- Number of Connected Components in an Undirected Graph (DSUF / DFS)
- Evaluate Division (DSUF)
- Clone Graph (DFS)
- Is Graph Bipartite? (Bipartite graph)
- Possible Bipartition (Bipartite Graph)
- All Paths From Source to Target (DFS)
- Path With Minimum Effort (DFS + Binary Search / Dijkstra)
- Graph Valid Tree (Check if Graph is a TREE)
- Connecting Cities With Minimum Cost (MST (Kruskal's/Prims))
- Regions Cut By Slashes (Counting islands / DSUF)
- Network Delay Time (Dijkstra/Bellman-Ford)
- Shortest Path to Get Food (BFS)
- Path With Maximum Minimum Value (Dijkstra)
- Shortest Path in a Hidden Grid (Dijkstra)
- Couples Holding Hands (DSUF)
- Minimum Path Cost in a Hidden Grid (Dijkstra)
- Path with Maximum Probability (Dijkstra)
- Parallel Courses (Topological Sort)
- Find the City With the Smallest Number of Neighbors at a Threshold Distance (Floyd Warshall)
- Course Schedule IV (Floyd Warshall)
- Cheapest Flights Within K Stops (Dijkstra/Bellman-Ford)
- Min Cost to Connect All Points (Prims/Kruskals MST)
- Remove Max Number of Edges to Keep Graph Fully Traversable (Prims/Kruskals MST / DSUF)
- Critical Connections in a Network (Tarjan's Algo)
- Number of Provinces (DSUF)
- Maximum Number of Accepted Invitations (Ford-Fulkerson / Hungarian algo)
- Alien Dictionary (Topological Sort)
- Minimum Degree of a Connected Trio in a Graph (Bruteforce (Adjacency Matrix))
- Detonate the Maximum Bombs (BFS)
- Egg Drop With 2 Eggs and N Floors (MCM)
- Super Egg Drop (MCM)
- Burst Balloons (MCM)
- Minimum Score Triangulation of Polygon (MCM)
- Longest Common Subsequence (LCS)
- Shortest Common Supersequence (LCS)
- Longest Palindromic Subsequence (LCS)
- Maximum Length of Repeated Subarray (LCS)
- Delete Operation for Two Strings (LCS)
- Partition Equal Subset Sum (KP (Knapsack) )
- Ones and Zeroes (KP (Knapsack))
- Target Sum (KP (Knapsack)
- Coin Change KP (Knapsack)
- Coin Change 2 KP (Knapsack)
- Longest Palindromic SubstringLPS
- Palindromic Substrings LPS
- Longest Increasing Subsequence LIS
- Number of Longest Increasing Subsequence LIS
- Minimum Operations to Make the Array K-Increasing
- LIS (NlogN)
- Edit Distance MED (Min Edit Dist)
- One Edit Distance MED (Min Edit Dist)
- Minimum Path Sum DP on Grid
- Unique Paths DP on Grid
- Unique Paths II DP on Grid
- Largest Rectangle in Histogram DP on Grid
- Maximal Square DP on Grid
- Maximal Rectangle DP on Grid
- Dungeon Game DP on Grid
- Partition to K Equal Sum Subsets DP BitMasking
- Matchsticks to Square DP BitMasking
- Number of Ways to Wear Different Hats to Each Other DP BitMasking
- Given string and pattern, match string with pattern (Implement KMP algo)
- Given string and pattern, match string with pattern (Implement Rabin Karp algo)
- Group anagrams
- Longest Palindromic substring
- Longest recurring subsequence
- String permutation algorithm (YouTube)
- Word wrap problem
- Minimum edit distance
- Word break problem
- Balanced parenthesis
- Longest common prefix
- Longest common subsequence
- Wildcard string matching
- Longest Common anagram subseuqnce
- Lexicographically smallest non-palindromic substring
- Given 2 strings, both representing integers (multiply them)
- Count all distinct substrings
- Difference of 2 large numbers represented as string