Here's a detailed and categorized list of frequently asked Data Structures and Algorithms (DSA) questions in product-based companies like Google, Amazon, Microsoft, Adobe, Atlassian, Uber, and others.
๐ 1. Arrays & Strings
These are the most basic and frequently asked.
Here are the LeetCode links for all the problems you've listed:
1. Two Sum (Leetcode 1)
๐ https://leetcode.com/problems/two-sum/
2. Best Time to Buy and Sell Stock (Leetcode 121)
๐ https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
3. Kadaneโs Algorithm โ Maximum Subarray (Leetcode 53)
๐ https://leetcode.com/problems/maximum-subarray/
4. Merge Intervals (Leetcode 56)
๐ https://leetcode.com/problems/merge-intervals/
5. Set Matrix Zeroes (Leetcode 73)
๐ https://leetcode.com/problems/set-matrix-zeroes/
6. Rotate Image / Matrix 90 Degrees (Leetcode 48)
๐ https://leetcode.com/problems/rotate-image/
7. Longest Consecutive Sequence (Leetcode 128)
๐ https://leetcode.com/problems/longest-consecutive-sequence/
8. Trapping Rain Water (Leetcode 42)
๐ https://leetcode.com/problems/trapping-rain-water/
9. Product of Array Except Self (Leetcode 238)
๐ https://leetcode.com/problems/product-of-array-except-self/
10. Sliding Window Maximum (Leetcode 239)
๐ https://leetcode.com/problems/sliding-window-maximum/
๐ 2. Hashing / HashMap / HashSet
Here are the LeetCode links for the additional problems you listed:
1. Subarray Sum Equals K (Leetcode 560)
๐ https://leetcode.com/problems/subarray-sum-equals-k/
2. Group Anagrams (Leetcode 49)
๐ https://leetcode.com/problems/group-anagrams/
3. Top K Frequent Elements (Leetcode 347)
๐ https://leetcode.com/problems/top-k-frequent-elements/
4. Longest Substring Without Repeating Characters (Leetcode 3)
๐ https://leetcode.com/problems/longest-substring-without-repeating-characters/
5. Longest Palindromic Substring (Leetcode 5)
๐ https://leetcode.com/problems/longest-palindromic-substring/
6. Minimum Window Substring (Leetcode 76)
๐ https://leetcode.com/problems/minimum-window-substring/
7. Isomorphic Strings (Leetcode 205)
๐ https://leetcode.com/problems/isomorphic-strings/
๐ 3. Two Pointers / Fast & Slow Pointers
Here are the LeetCode links for the problems in your latest list:
1. Container With Most Water (Leetcode 11)
๐ https://leetcode.com/problems/container-with-most-water/
2. 3Sum (Leetcode 15)
๐ https://leetcode.com/problems/3sum/
3. 4Sum (Leetcode 18)
๐ https://leetcode.com/problems/4sum/
4. Remove Duplicates from Sorted Array (Leetcode 26)
๐ https://leetcode.com/problems/remove-duplicates-from-sorted-array/
5. Move Zeroes (Leetcode 283)
๐ https://leetcode.com/problems/move-zeroes/
6. Linked List Cycle (Leetcode 141)
๐ https://leetcode.com/problems/linked-list-cycle/
7. Intersection of Two Linked Lists (Leetcode 160)
๐ https://leetcode.com/problems/intersection-of-two-linked-lists/
8. Palindrome Linked List (Leetcode 234)
๐ https://leetcode.com/problems/palindrome-linked-list/
๐ 4. Sorting & Searching
Here are the LeetCode links (and related links for sorting problems) for the new list of problems:
1. โ Merge Sort / Quick Sort (Implementations)
While not directly asked in LeetCode, you can implement them as practice. Here are related problems:
- ๐ธ Sort an Array (Leetcode 912) ๐ https://leetcode.com/problems/sort-an-array/ You can implement Merge Sort or Quick Sort for this.
2. ๐ Binary Search on Sorted Array (Leetcode 704)
๐ https://leetcode.com/problems/binary-search/
3. ๐ Search in Rotated Sorted Array (Leetcode 33)
๐ https://leetcode.com/problems/search-in-rotated-sorted-array/
4. โ๏ธ Median of Two Sorted Arrays (Leetcode 4)
๐ https://leetcode.com/problems/median-of-two-sorted-arrays/
5. ๐ข Kth Largest Element in an Array (Leetcode 215)
๐ https://leetcode.com/problems/kth-largest-element-in-an-array/
6. ๐ Count Inversions in Array
Not available on LeetCode directly, but very common on:
- ๐ธ GFG: Count Inversions ๐ https://practice.geeksforgeeks.org/problems/inversion-of-array-1587115620/1 You can solve it using modified Merge Sort.
7. ๐งญ Search a 2D Matrix (Leetcode 74)
๐ https://leetcode.com/problems/search-a-2d-matrix/
๐ 5. Recursion & Backtracking
Here are the LeetCode links for the backtracking and combinatorics problems you listed:
1. โ Subsets (Leetcode 78)
๐ https://leetcode.com/problems/subsets/
2. โ Subsets II (Leetcode 90)
๐ https://leetcode.com/problems/subsets-ii/
3. ๐ Permutations (Leetcode 46)
๐ https://leetcode.com/problems/permutations/
4. ๐ Permutations II (Leetcode 47)
๐ https://leetcode.com/problems/permutations-ii/
5. ๐ N-Queens (Leetcode 51)
๐ https://leetcode.com/problems/n-queens/
6. ๐งฉ Sudoku Solver (Leetcode 37)
๐ https://leetcode.com/problems/sudoku-solver/
7. ๐ Word Search (Leetcode 79)
๐ https://leetcode.com/problems/word-search/
8. โ Combination Sum (Leetcode 39)
๐ https://leetcode.com/problems/combination-sum/
9. โ Combination Sum II (Leetcode 40)
๐ https://leetcode.com/problems/combination-sum-ii/
10. โ๏ธ Letter Combinations of a Phone Number (Leetcode 17)
๐ https://leetcode.com/problems/letter-combinations-of-a-phone-number/
๐ 6. Linked Lists
Here are solid links from LeetCode (or similar trusted sites) for each of your linked list topics:
Reverse Linked List
https://leetcode.com/problems/reverse-linked-list/Detect Cycle in Linked List
https://leetcode.com/problems/linked-list-cycle/Merge Two Sorted Lists
https://leetcode.com/problems/merge-two-sorted-lists/Add Two Numbers (Linked List based)
https://leetcode.com/problems/add-two-numbers/LRU Cache (Design)
https://leetcode.com/problems/lru-cache/Copy List with Random Pointer
https://leetcode.com/problems/copy-list-with-random-pointer/Flatten a Multilevel Doubly Linked List
https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list/Merge K Sorted Lists
https://leetcode.com/problems/merge-k-sorted-lists/
๐ 7. Trees & Binary Trees
Here are the LeetCode links for your list of binary tree problems, covering traversal, construction, depth, and more:
1. ๐ณ Maximum Depth of Binary Tree (Leetcode 104)
๐ https://leetcode.com/problems/maximum-depth-of-binary-tree/
2. ๐ Diameter of Binary Tree (Leetcode 543)
๐ https://leetcode.com/problems/diameter-of-binary-tree/
3. ๐ Inorder / Preorder / Postorder Traversal
Inorder (Leetcode 94)
๐ https://leetcode.com/problems/binary-tree-inorder-traversal/Preorder (Leetcode 144)
๐ https://leetcode.com/problems/binary-tree-preorder-traversal/Postorder (Leetcode 145)
๐ https://leetcode.com/problems/binary-tree-postorder-traversal/
You can solve each using **recursive* and iterative approaches.*
4. ๐ถ Level Order Traversal / Zigzag Level Order
Level Order (Leetcode 102)
๐ https://leetcode.com/problems/binary-tree-level-order-traversal/Zigzag Level Order (Leetcode 103)
๐ https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/
5. ๐ Symmetric Tree (Leetcode 101)
๐ https://leetcode.com/problems/symmetric-tree/
6. ๐งฌ Lowest Common Ancestor of a Binary Tree (Leetcode 236)
๐ https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/
7. ๐ Serialize and Deserialize Binary Tree (Leetcode 297)
๐ https://leetcode.com/problems/serialize-and-deserialize-binary-tree/
8. ๐๏ธ Construct Binary Tree from Inorder and Preorder/Postorder Traversal
From Preorder + Inorder (Leetcode 105)
๐ https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/From Postorder + Inorder (Leetcode 106)
๐ https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/
๐ 8. Binary Search Trees (BST)
Here are the LeetCode links for your list of Binary Search Tree (BST) problems:
1. โ Validate Binary Search Tree (Leetcode 98)
๐ https://leetcode.com/problems/validate-binary-search-tree/
2. ๐ข Kth Smallest Element in a BST (Leetcode 230)
๐ https://leetcode.com/problems/kth-smallest-element-in-a-bst/
3. ๐ฒ Convert Sorted Array to BST (Leetcode 108)
๐ https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/
4. โ Delete Node in a BST (Leetcode 450)
๐ https://leetcode.com/problems/delete-node-in-a-bst/
5. ๐งฌ Lowest Common Ancestor of a BST (Leetcode 235)
๐ https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/
6. ๐งญ BST Iterator (Leetcode 173)
๐ https://leetcode.com/problems/binary-search-tree-iterator/
๐ 9. Heaps / Priority Queue
Here are the LeetCode links for your list of heap/priority queue-based and advanced data structure problems:
1. ๐ข Kth Largest Element in an Array (Leetcode 215)
๐ https://leetcode.com/problems/kth-largest-element-in-an-array/
2. ๐ Top K Frequent Words (Leetcode 692)
๐ https://leetcode.com/problems/top-k-frequent-words/
3. ๐ Merge K Sorted Lists (Leetcode 23)
๐ https://leetcode.com/problems/merge-k-sorted-lists/
4. ๐ Reorganize String (Leetcode 767)
๐ https://leetcode.com/problems/reorganize-string/
5. ๐ Find Median from Data Stream (Leetcode 295)
๐ https://leetcode.com/problems/find-median-from-data-stream/
6. ๐ Sliding Window Maximum (Leetcode 239)
๐ https://leetcode.com/problems/sliding-window-maximum/
๐ 10. Stack & Monotonic Stack
Here are the LeetCode links for your list of stack-based problems (classic interview questions):
1. โ Valid Parentheses (Leetcode 20)
๐ https://leetcode.com/problems/valid-parentheses/
2. ๐ฆ Min Stack (Leetcode 155)
๐ https://leetcode.com/problems/min-stack/
Design problem using stack with constant-time min retrieval.
3. ๐ซ Largest Rectangle in Histogram (Leetcode 84)
๐ https://leetcode.com/problems/largest-rectangle-in-histogram/
Classic monotonic stack problem.
4. ๐ก๏ธ Daily Temperatures (Leetcode 739)
๐ https://leetcode.com/problems/daily-temperatures/
Monotonic decreasing stack used to find next warmer day.
5. ๐ Next Greater Element I (Leetcode 496)
๐ https://leetcode.com/problems/next-greater-element-i/
6. ๐ Next Greater Element II (Leetcode 503)
๐ https://leetcode.com/problems/next-greater-element-ii/
7. โ๏ธ Asteroid Collision (Leetcode 735)
๐ https://leetcode.com/problems/asteroid-collision/
๐ 11. Queues & Deque
Here are the LeetCode links for your list of queues, stacks, and BFS/graph traversal problems:
1. ๐ Implement Queue using Stacks (Leetcode 232)
๐ https://leetcode.com/problems/implement-queue-using-stacks/
Use two stacks to simulate FIFO behavior.
2. ๐ฆ LRU Cache (Leetcode 146)
๐ https://leetcode.com/problems/lru-cache/
Design question using
HashMap
+Doubly Linked List
.
3. ๐ Sliding Window Maximum (Leetcode 239)
๐ https://leetcode.com/problems/sliding-window-maximum/
Can be solved using Deque or Heap.
4. ๐ Rotting Oranges (Leetcode 994)
๐ https://leetcode.com/problems/rotting-oranges/
Classic BFS in a grid problem.
5. ๐ข Shortest Path in Binary Matrix (Leetcode 1091)
๐ https://leetcode.com/problems/shortest-path-in-binary-matrix/
Another BFS grid traversal problem with 8 directions.
๐ 12. Graphs (BFS / DFS / Union-Find)
Here are the LeetCode links for your list of graph and related problems (covering DFS, BFS, Union-Find, Topological Sort, and shortest path algorithms):
1. ๐๏ธ Number of Islands (Leetcode 200)
๐ https://leetcode.com/problems/number-of-islands/
Classic DFS/BFS grid problem.
2. ๐ธ๏ธ Clone Graph (Leetcode 133)
๐ https://leetcode.com/problems/clone-graph/
DFS/BFS + HashMap for graph cloning.
3. ๐ Course Schedule (Leetcode 207)
๐ https://leetcode.com/problems/course-schedule/
Topological Sort / Cycle detection in directed graph.
4. ๐ Word Ladder (Leetcode 127)
๐ https://leetcode.com/problems/word-ladder/
BFS shortest path in word graph.
5. ๐ Pacific Atlantic Water Flow (Leetcode 417)
๐ https://leetcode.com/problems/pacific-atlantic-water-flow/
Multi-source BFS/DFS on matrix.
6. ๐ Detect Cycle in Directed/Undirected Graph
- Directed Graph cycle detection (Leetcode 207 / 210 variants)
- Undirected Graph cycle detection (Leetcode 261 / custom)
Use DFS or Union-Find.
7. ๐ Union-Find Problems (Connected Components)
- Example: Number of Connected Components in an Undirected Graph (Leetcode 323) ๐ https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/
8. ๐ก Network Delay Time (Leetcode 743)
๐ https://leetcode.com/problems/network-delay-time/
Use Dijkstraโs algorithm.
9. ๐ฃ๏ธ Dijkstraโs Algorithm / Bellman-Ford Algorithm
Here you go โ solid links for your graph shortest path topics:
Dijkstraโs Algorithm (LeetCode 743 - Network Delay Time)
https://leetcode.com/problems/network-delay-time/Bellman-Ford Algorithm Tutorials (no direct LeetCode problem)
๐ 13. Greedy Algorithms
1. ๐โโ๏ธ Jump Game I (Leetcode 55)
๐ https://leetcode.com/problems/jump-game/
2. ๐โโ๏ธ Jump Game II (Leetcode 45)
๐ https://leetcode.com/problems/jump-game-ii/
3. โฝ Gas Station (Leetcode 134)
๐ https://leetcode.com/problems/gas-station/
4. ๐ฏ Partition Labels (Leetcode 763)
๐ https://leetcode.com/problems/partition-labels/
5. ๐ Minimum Number of Arrows to Burst Balloons (Leetcode 452)
๐ https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/
6. ๐ Activity Selection Problem
- This is a classic greedy problem, and a very similar problem on LeetCode is Non-overlapping Intervals (Leetcode 435) ๐ https://leetcode.com/problems/non-overlapping-intervals/
7. ๐ Merge Intervals (Leetcode 56)
๐ https://leetcode.com/problems/merge-intervals/
8. ๐ Interval Scheduling
- Interval scheduling maximization is essentially the same as the activity selection problem;
- For interval scheduling variants, see Non-overlapping Intervals (Leetcode 435) above.
๐ 14. Dynamic Programming (DP)
Very important for top product companies.
๐งฑ 1D DP
Here are the LeetCode links for your list of classic dynamic programming (DP) problems:
1. ๐ข Fibonacci Number (Leetcode 509)
๐ https://leetcode.com/problems/fibonacci-number/
2. ๐งโโ๏ธ Climbing Stairs (Leetcode 70)
๐ https://leetcode.com/problems/climbing-stairs/
3. ๐ House Robber I (Leetcode 198)
๐ https://leetcode.com/problems/house-robber/
4. ๐ House Robber II (Leetcode 213)
๐ https://leetcode.com/problems/house-robber-ii/
5. โ Maximum Subarray (Kadaneโs Algorithm) (Leetcode 53)
๐ https://leetcode.com/problems/maximum-subarray/
6. ๐ฐ Coin Change (Leetcode 322)
๐ https://leetcode.com/problems/coin-change/
7. ๐ Longest Increasing Subsequence (Leetcode 300)
๐ https://leetcode.com/problems/longest-increasing-subsequence/
๐งฑ 2D DP
Here are the LeetCode links for your advanced dynamic programming problems:
1. ๐ Longest Common Subsequence (LCS)
- Leetcode: 1143. Longest Common Subsequence
2. โ๏ธ Edit Distance (Levenshtein Distance)
- Leetcode: 72. Edit Distance
3. ๐ Matrix Chain Multiplication
-
No direct LeetCode problem, but a good reference problem:
- 312. Burst Balloons (similar DP structure)
- Or use GeeksforGeeks Matrix Chain Multiplication for detailed explanation.
4. ๐ 0/1 Knapsack
-
Leetcode doesnโt have the classical knapsack, but similar problems:
5. ๐ Unique Paths
- Leetcode: 62. Unique Paths
6. โ Minimum Path Sum
- Leetcode: 64. Minimum Path Sum
7. ๐ Palindromic Substrings
- Leetcode: 647. Palindromic Substrings
8. ๐ Wildcard Matching (Leetcode 44)
๐ https://leetcode.com/problems/wildcard-matching/
Regex Matching (Leetcode 10)
๐ https://leetcode.com/problems/regular-expression-matching/
๐งฑ DP on Trees / Graphs
Here are the LeetCode links and explanations for your requested problems involving trees, DP on DAG, and word break:
1. ๐ฒ Maximum Path Sum in Binary Tree (Leetcode 124)
๐ https://leetcode.com/problems/binary-tree-maximum-path-sum/
Find the max sum path which can start and end anywhere in the binary tree.
2. ๐ DP on DAG (Longest Path)
-
Leetcode doesnโt have a direct โLongest Path in DAGโ problem, but closely related:
- Course Schedule II (Leetcode 210) (Topological sort + DP) ๐ https://leetcode.com/problems/course-schedule-ii/
- Or you can use DP after topological sorting in any DAG to find longest path.
3. ๐งฉ Word Break (Leetcode 139)
๐ https://leetcode.com/problems/word-break/
Use DP to check if string can be segmented into dictionary words.
๐ 15. Tries (Prefix Trees)
Here are the LeetCode links for your Trie and advanced string problems:
1. ๐ฒ Implement Trie (Prefix Tree)
๐ 208. Implement Trie (Prefix Tree)
Insert, search, and prefix matching in a Trie data structure.
2. ๐ Word Search II
๐ 212. Word Search II
Use Trie + DFS for multiple word searching on a board.
3. ๐ Replace Words
๐ 648. Replace Words
Use Trie to replace words with their roots.
4. ๐ Palindrome Pairs
Use Trie and hashing techniques to find pairs of words that form palindromes.
๐ 16. Bit Manipulation
Here are the LeetCode links for your bit manipulation problems:
1. โ๏ธ Single Number (Leetcode 136)
๐ https://leetcode.com/problems/single-number/
Find the element that appears once when every other element appears twice.
2. โ๏ธโ๏ธ Single Number II (Leetcode 137)
๐ https://leetcode.com/problems/single-number-ii/
Find the element that appears once when every other element appears thrice.
3. ๐ข Number of 1 Bits (Leetcode 191)
๐ https://leetcode.com/problems/number-of-1-bits/
Count the number of set bits (1s) in an integer.
4. ๐งฎ Counting Bits (Leetcode 338)
๐ https://leetcode.com/problems/counting-bits/
For every number i in [0, n], count the number of 1s in binary representation.
5. โ XOR of all elements
- This is typically part of problems like Single Number.
- You can XOR all elements to get the unique number.
- No specific LeetCode problem, but example in 136. Single Number.
6. ๐ฅ Power of Two (Leetcode 231)
๐ https://leetcode.com/problems/power-of-two/
Check if a number is a power of two using bit manipulation.
7. ๐ Subsets using Bitmasks
-
No direct LeetCode problem titled โSubsets using bitmasksโ but related:
- 78. Subsets โ Can be solved by bitmask enumeration.
๐ 17. Sliding Window
Here are the LeetCode links for your sliding window & substring problems:
1. ๐ Minimum Window Substring
๐ 76. Minimum Window Substring
2. ๐งฉ Longest Substring with At Most K Distinct Characters
๐ 340. Longest Substring with At Most K Distinct Characters
3. ๐ Longest Repeating Character Replacement
๐ 424. Longest Repeating Character Replacement
4. ๐ Permutation in String
๐ 567. Permutation in String
5. โ Maximum Sum of Subarray of Size K
- Classic fixed-size sliding window max sum problem; no direct LeetCode link but very similar: ๐ 209. Minimum Size Subarray Sum (similar sliding window technique)
- Or Max Sum Subarray of size k - GeeksforGeeks
๐ 18. Matrix Problems
Here are the LeetCode links for your 2D matrix and grid problems:
1. ๐ Spiral Order
๐ 54. Spiral Matrix
2. ๐ Rotate Image (90 degrees)
๐ 48. Rotate Image
3. ๐ Word Search
๐ 79. Word Search
4. 0๏ธโฃ Set Matrix Zeroes
5. ๐ Search in 2D Matrix
6. ๐๏ธ Number of Islands (Island Problems - DFS/BFS)
๐ 19. Design / OOP Based Questions
1. LRU Cache
- Concept: The Least Recently Used (LRU) cache evicts the least recently accessed item when the cache reaches its capacity.
- Implementation: Utilizes a combination of a doubly linked list and a hash map to achieve O(1) time complexity for both get and put operations.
- Resource: LRU Cache โ Complete Tutorial - GeeksforGeeks(GeeksforGeeks, GeeksforGeeks, GeeksforGeeks)
2. Design Twitter
- Overview: Designing a scalable and efficient system to handle millions of users, tweets, and interactions.
- Key Components: User management, tweet storage, timeline generation, and follower relationships.
- Resource: Designing Twitter โ A System Design Interview Question - GeeksforGeeks(GeeksforGeeks, GeeksforGeeks)
3. Design Hit Counter
- Objective: Create a system that counts the number of hits received in the past 5 minutes.
- Challenges: Efficiently managing time-based data and ensuring scalability.
- Resource: Design a Hit Counter - GeeksforGeeks(GeeksforGeeks)
4. Design File System
- Focus: Developing an in-memory file system that supports basic file operations.
- Considerations: Data structures for file storage, metadata management, and file retrieval.
- Resource: Design data structures and algorithms for in-memory file system - GeeksforGeeks(GeeksforGeeks)
5. Design Snake Game
- Objective: Implement the classic Snake game where the player controls a snake to eat food and grow longer without colliding with itself or the walls.
- Approach: Utilize game loops, collision detection, and score tracking.
- Resource: Design Snake Game - GeeksforGeeks(GeeksforGeeks)
6. Design Parking Lot
- Goal: Design a parking lot system that manages parking spaces, vehicle entry/exit, and payment.
- Considerations: Object-oriented design principles, class structures, and system scalability.
- Resource: Designing Parking Lot (Garage) System - GeeksforGeeks(GeeksforGeeks, GeeksforGeeks)
7. Design Browser History
- Functionality: Implement a browser history feature that supports visiting URLs, navigating back and forward, and managing the history stack.
- Implementation: Use stacks to manage the history and current state.
- Resource: Design Browser History - GeeksforGeeks(GeeksforGeeks)
๐ 20. Math & Number Theory
Got it! Here is one solid, working link per topic for you:
Sieve of Eratosthenes
Modular Exponentiation
https://www.geeksforgeeks.org/modular-exponentiation-power-in-modular-arithmetic/Count Primes
https://leetcode.com/problems/count-primes/Excel Sheet Column Title
https://leetcode.com/problems/excel-sheet-column-title/Pow(x, n)
https://leetcode.com/problems/powx-n/
๐ง Bonus: Top 25 DSA Questions for Final Revision
Two Sum
๐ 1. Two SumLongest Substring Without Repeating Characters
๐ 3. Longest Substring Without Repeating CharactersMerge Intervals
๐ 56. Merge IntervalsMaximum Subarray
๐ 53. Maximum SubarrayMerge K Sorted Lists
๐ 23. Merge k Sorted ListsClone Graph
๐ 133. Clone GraphWord Ladder
๐ 127. Word LadderLongest Common Subsequence
๐ 1143. Longest Common SubsequenceLRU Cache
๐ 146. LRU CacheNumber of Islands
๐ 200. Number of IslandsSearch in Rotated Sorted Array
๐ 33. Search in Rotated Sorted ArrayMedian of Two Sorted Arrays
๐ 4. Median of Two Sorted ArraysSubsets
๐ 78. Subsets0/1 Knapsack
(Not on LeetCode, but classic problem; see Knapsack on GeeksforGeeks)Edit Distance
๐ 72. Edit DistanceDetect Cycle in Directed Graph
๐ 207. Course Schedule (Detect Cycle in Directed Graph)Course Schedule
๐ 207. Course ScheduleTrie Insert/Search
๐ 208. Implement Trie (Prefix Tree)Maximum Path Sum in Binary Tree
๐ 124. Binary Tree Maximum Path SumLargest Rectangle in Histogram
๐ 84. Largest Rectangle in HistogramSliding Window Maximum
๐ 239. Sliding Window MaximumKth Largest Element
๐ 215. Kth Largest Element in an ArrayMinimum Window Substring
๐ 76. Minimum Window SubstringGas Station
๐ 134. Gas StationN-Queens
๐ 51. N-Queens
Top comments (0)