TOPICS
Below is the classification of problems based on topics, useful while cementing any particular data structure, algorithm or topic.
Air Transport
Array
- 1. Two Sum
- 105. Construct Binary Tree from Preorder and Inorder Traversal
- 108. Convert Sorted Array to Binary Search Tree
- 1095. Find in Mountain Array
- 11. Container With Most Water
- 121. Best Time to Buy and Sell Stock
- 122. Best Time to Buy and Sell Stock II
- 123. Best Time to Buy and Sell Stock III
- 135. Candy
- 136. Single Number
- 139. Word Break
- 15. 3Sum
- 152. Maximum Product Subarray
- 1636. Sort Array by Increasing Frequency
- 169. Majority Element
- 198. House Robber
- 200. Number of Islands
- 212. Word Search II
- 215. Kth Largest Element in an Array
- 217. Contains Duplicate
- 2226. Maximum Candies Allocated to K Children
- 2294. Partition Array Such That Maximum Difference Is K
- 238. Product of Array Except Self
- 240. Search a 2D Matrix II
- 268. Missing Number
- 322. Coin Change
- 33. Search in Rotated Sorted Array
- 39. Combination Sum
- 4. Median of Two Sorted Arrays
- 407. Trapping Rain Water II
- 42. Trapping Rain Water
- 442. Find All Duplicates in an Array
- 49. Group Anagrams
- 53. Maximum Subarray
- 54. Spiral Matrix
- 56. Merge Intervals
- 704. Binary Search
- 705. Design HashSet
- 706. Design HashMap
- 73. Set Matrix Zeroes
- 739. Daily Temperatures
- 74. Search a 2D Matrix
- 746. Min Cost Climbing Stairs
- 79. Word Search
- 875. Koko Eating Bananas
- 978. Longest Turbulent Subarray
Backtracking
Binary Search
- 1095. Find in Mountain Array
- 2226. Maximum Candies Allocated to K Children
- 240. Search a 2D Matrix II
- 268. Missing Number
- 33. Search in Rotated Sorted Array
- 374. Guess Number Higher or Lower
- 4. Median of Two Sorted Arrays
- 704. Binary Search
- 74. Search a 2D Matrix
- 875. Koko Eating Bananas
Binary Search Tree
- 108. Convert Sorted Array to Binary Search Tree
- 230. Kth Smallest Element in a BST
- 703. Kth Largest Element in a Stream
- 98. Validate Binary Search Tree
Binary Tree
- 100. Same Tree
- 101. Symmetric Tree
- 103. Binary Tree Zigzag Level Order Traversal
- 104. Maximum Depth of Binary Tree
- 105. Construct Binary Tree from Preorder and Inorder Traversal
- 108. Convert Sorted Array to Binary Search Tree
- 114. Flatten Binary Tree to Linked List
- 226. Invert Binary Tree
- 230. Kth Smallest Element in a BST
- 297. Serialize and Deserialize Binary Tree
- 543. Diameter of Binary Tree
- 703. Kth Largest Element in a Stream
- 98. Validate Binary Search Tree
Bit Manipulation
Breadth-First Search
- 100. Same Tree
- 101. Symmetric Tree
- 103. Binary Tree Zigzag Level Order Traversal
- 104. Maximum Depth of Binary Tree
- 200. Number of Islands
- 207. Course Schedule
- 226. Invert Binary Tree
- 297. Serialize and Deserialize Binary Tree
- 322. Coin Change
- 407. Trapping Rain Water II
Bucket Sort
Combinatorics
Counting
Data Stream
Depth-First Search
- 100. Same Tree
- 101. Symmetric Tree
- 104. Maximum Depth of Binary Tree
- 114. Flatten Binary Tree to Linked List
- 200. Number of Islands
- 207. Course Schedule
- 226. Invert Binary Tree
- 230. Kth Smallest Element in a BST
- 297. Serialize and Deserialize Binary Tree
- 543. Diameter of Binary Tree
- 79. Word Search
- 98. Validate Binary Search Tree
Design
- 146. LRU Cache
- 155. Min Stack
- 208. Implement Trie (Prefix Tree)
- 295. Find Median from Data Stream
- 297. Serialize and Deserialize Binary Tree
- 355. Design Twitter
- 703. Kth Largest Element in a Stream
- 705. Design HashSet
- 706. Design HashMap
Divide and Conquer
- 105. Construct Binary Tree from Preorder and Inorder Traversal
- 108. Convert Sorted Array to Binary Search Tree
- 169. Majority Element
- 191. Number of 1 Bits
- 215. Kth Largest Element in an Array
- 240. Search a 2D Matrix II
- 4. Median of Two Sorted Arrays
- 53. Maximum Subarray
Doubly-Linked List
Dynamic Programming
- 1143. Longest Common Subsequence
- 121. Best Time to Buy and Sell Stock
- 122. Best Time to Buy and Sell Stock II
- 123. Best Time to Buy and Sell Stock III
- 139. Word Break
- 152. Maximum Product Subarray
- 198. House Robber
- 322. Coin Change
- 42. Trapping Rain Water
- 5. Longest Palindromic Substring
- 53. Maximum Subarray
- 62. Unique Paths
- 70. Climbing Stairs
- 746. Min Cost Climbing Stairs
- 978. Longest Turbulent Subarray
Graph
Greedy
- 11. Container With Most Water
- 122. Best Time to Buy and Sell Stock II
- 135. Candy
- 2294. Partition Array Such That Maximum Difference Is K
Ground Transport
Hash Function
Hash Table
- 1. Two Sum
- 105. Construct Binary Tree from Preorder and Inorder Traversal
- 139. Word Break
- 141. Linked List Cycle
- 146. LRU Cache
- 1636. Sort Array by Increasing Frequency
- 169. Majority Element
- 208. Implement Trie (Prefix Tree)
- 217. Contains Duplicate
- 242. Valid Anagram
- 268. Missing Number
- 3. Longest Substring Without Repeating Characters
- 355. Design Twitter
- 424. Longest Repeating Character Replacement
- 442. Find All Duplicates in an Array
- 451. Sort Characters By Frequency
- 49. Group Anagrams
- 705. Design HashSet
- 706. Design HashMap
- 73. Set Matrix Zeroes
Heap (Priority Queue)
- 215. Kth Largest Element in an Array
- 295. Find Median from Data Stream
- 355. Design Twitter
- 407. Trapping Rain Water II
- 451. Sort Characters By Frequency
- 703. Kth Largest Element in a Stream
Interactive
LP
Linked List
- 114. Flatten Binary Tree to Linked List
- 141. Linked List Cycle
- 146. LRU Cache
- 19. Remove Nth Node From End of List
- 2. Add Two Numbers
- 206. Reverse Linked List
- 21. Merge Two Sorted Lists
- 355. Design Twitter
- 705. Design HashSet
- 706. Design HashMap
- 876. Middle of the Linked List
MIP
Math
- 2. Add Two Numbers
- 268. Missing Number
- 29. Divide Two Integers
- 50. Pow(x, n)
- 62. Unique Paths
- 7. Reverse Integer
- 70. Climbing Stairs
Matrix
- 200. Number of Islands
- 212. Word Search II
- 240. Search a 2D Matrix II
- 4. N Queen
- 407. Trapping Rain Water II
- 54. Spiral Matrix
- 73. Set Matrix Zeroes
- 74. Search a 2D Matrix
- 79. Word Search
Memoization
Monotonic Stack
Optimization
Prefix Sum
Quickselect
Recursion
Simulation
Sliding Window
- 3. Longest Substring Without Repeating Characters
- 424. Longest Repeating Character Replacement
- 978. Longest Turbulent Subarray
Sorting
- 15. 3Sum
- 1636. Sort Array by Increasing Frequency
- 169. Majority Element
- 215. Kth Largest Element in an Array
- 217. Contains Duplicate
- 2294. Partition Array Such That Maximum Difference Is K
- 242. Valid Anagram
- 268. Missing Number
- 295. Find Median from Data Stream
- 451. Sort Characters By Frequency
- 49. Group Anagrams
- 56. Merge Intervals
Stack
- 114. Flatten Binary Tree to Linked List
- 155. Min Stack
- 20. Valid Parentheses
- 42. Trapping Rain Water
- 739. Daily Temperatures
String
- 1143. Longest Common Subsequence
- 125. Valid Palindrome
- 139. Word Break
- 20. Valid Parentheses
- 208. Implement Trie (Prefix Tree)
- 212. Word Search II
- 242. Valid Anagram
- 297. Serialize and Deserialize Binary Tree
- 3. Longest Substring Without Repeating Characters
- 344. Reverse String
- 424. Longest Repeating Character Replacement
- 451. Sort Characters By Frequency
- 49. Group Anagrams
- 5. Longest Palindromic Substring
- 79. Word Search
Topological Sort
Tree
- 100. Same Tree
- 101. Symmetric Tree
- 103. Binary Tree Zigzag Level Order Traversal
- 104. Maximum Depth of Binary Tree
- 105. Construct Binary Tree from Preorder and Inorder Traversal
- 108. Convert Sorted Array to Binary Search Tree
- 114. Flatten Binary Tree to Linked List
- 226. Invert Binary Tree
- 230. Kth Smallest Element in a BST
- 297. Serialize and Deserialize Binary Tree
- 543. Diameter of Binary Tree
- 703. Kth Largest Element in a Stream
- 98. Validate Binary Search Tree
Trie
Two Pointers
- 11. Container With Most Water
- 125. Valid Palindrome
- 141. Linked List Cycle
- 15. 3Sum
- 19. Remove Nth Node From End of List
- 295. Find Median from Data Stream
- 344. Reverse String
- 42. Trapping Rain Water
- 5. Longest Palindromic Substring
- 876. Middle of the Linked List