DEV Community

Dev Cookies
Dev Cookies

Posted on

Top DSA questions asked in product based companiesโ†—๏ธ๐Ÿ“

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:


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:


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:


  1. Reverse Linked List
    https://leetcode.com/problems/reverse-linked-list/

  2. Detect Cycle in Linked List
    https://leetcode.com/problems/linked-list-cycle/

  3. Merge Two Sorted Lists
    https://leetcode.com/problems/merge-two-sorted-lists/

  4. Add Two Numbers (Linked List based)
    https://leetcode.com/problems/add-two-numbers/

  5. LRU Cache (Design)
    https://leetcode.com/problems/lru-cache/

  6. Copy List with Random Pointer
    https://leetcode.com/problems/copy-list-with-random-pointer/

  7. Flatten a Multilevel Doubly Linked List
    https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list/

  8. 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

You can solve each using **recursive* and iterative approaches.*


4. ๐Ÿ“ถ Level Order Traversal / Zigzag Level Order


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


๐Ÿ“Œ 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)


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:


  1. Dijkstraโ€™s Algorithm (LeetCode 743 - Network Delay Time)
    https://leetcode.com/problems/network-delay-time/

  2. 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


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)


2. โœ๏ธ Edit Distance (Levenshtein Distance)


3. ๐Ÿ”— Matrix Chain Multiplication


4. ๐ŸŽ’ 0/1 Knapsack


5. ๐Ÿš— Unique Paths


6. โž– Minimum Path Sum


7. ๐Ÿ”„ 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:


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

๐Ÿ”— 336. 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


๐Ÿ“Œ 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

๐Ÿ”— 73. Set Matrix Zeroes


5. ๐Ÿ”Ž Search in 2D Matrix

๐Ÿ”— 74. Search a 2D Matrix


6. ๐Ÿ๏ธ Number of Islands (Island Problems - DFS/BFS)

๐Ÿ”— 200. Number of Islands


๐Ÿ“Œ 19. Design / OOP Based Questions

1. LRU Cache


2. Design Twitter


3. Design Hit Counter


4. Design File System


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


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

  1. https://www.geeksforgeeks.org/sieve-of-eratosthenes/

  2. GCD/LCM
    https://www.khanacademy.org/computing/computer-science/cryptography/modarithmetic/a/the-euclidean-algorithm

  3. Modular Exponentiation
    https://www.geeksforgeeks.org/modular-exponentiation-power-in-modular-arithmetic/

  4. Count Primes
    https://leetcode.com/problems/count-primes/

  5. Excel Sheet Column Title
    https://leetcode.com/problems/excel-sheet-column-title/

  6. Pow(x, n)
    https://leetcode.com/problems/powx-n/


๐Ÿง  Bonus: Top 25 DSA Questions for Final Revision

  1. Two Sum
    ๐Ÿ”— 1. Two Sum

  2. Longest Substring Without Repeating Characters
    ๐Ÿ”— 3. Longest Substring Without Repeating Characters

  3. Merge Intervals
    ๐Ÿ”— 56. Merge Intervals

  4. Maximum Subarray
    ๐Ÿ”— 53. Maximum Subarray

  5. Merge K Sorted Lists
    ๐Ÿ”— 23. Merge k Sorted Lists

  6. Clone Graph
    ๐Ÿ”— 133. Clone Graph

  7. Word Ladder
    ๐Ÿ”— 127. Word Ladder

  8. Longest Common Subsequence
    ๐Ÿ”— 1143. Longest Common Subsequence

  9. LRU Cache
    ๐Ÿ”— 146. LRU Cache

  10. Number of Islands
    ๐Ÿ”— 200. Number of Islands

  11. Search in Rotated Sorted Array
    ๐Ÿ”— 33. Search in Rotated Sorted Array

  12. Median of Two Sorted Arrays
    ๐Ÿ”— 4. Median of Two Sorted Arrays

  13. Subsets
    ๐Ÿ”— 78. Subsets

  14. 0/1 Knapsack
    (Not on LeetCode, but classic problem; see Knapsack on GeeksforGeeks)

  15. Edit Distance
    ๐Ÿ”— 72. Edit Distance

  16. Detect Cycle in Directed Graph
    ๐Ÿ”— 207. Course Schedule (Detect Cycle in Directed Graph)

  17. Course Schedule
    ๐Ÿ”— 207. Course Schedule

  18. Trie Insert/Search
    ๐Ÿ”— 208. Implement Trie (Prefix Tree)

  19. Maximum Path Sum in Binary Tree
    ๐Ÿ”— 124. Binary Tree Maximum Path Sum

  20. Largest Rectangle in Histogram
    ๐Ÿ”— 84. Largest Rectangle in Histogram

  21. Sliding Window Maximum
    ๐Ÿ”— 239. Sliding Window Maximum

  22. Kth Largest Element
    ๐Ÿ”— 215. Kth Largest Element in an Array

  23. Minimum Window Substring
    ๐Ÿ”— 76. Minimum Window Substring

  24. Gas Station
    ๐Ÿ”— 134. Gas Station

  25. N-Queens
    ๐Ÿ”— 51. N-Queens

Top comments (0)