The coding problems featured in the book Coding Interview Patterns by ByteByteGo are also available on their official webpage.
For convenience, I have compiled the list of these problems in CSV format at the bottom of this page. Additionally, I have included the corresponding LeetCode links, problem IDs, and titles, where applicable. (The CSV format can be easily converted into an Excel or Numbers document for further use.)
The problem list
problem | difficulty | category | leetcode_link |
---|---|---|---|
Pair Sum - Sorted | Easy | Two Pointers | 167. Two Sum II - Input Array Is Sorted |
Triplet Sum | Medium | Two Pointers | 15. 3Sum |
Is Palindrome Valid | Easy | Two Pointers | 125. Valid Palindrome |
Largest Container | Medium | Two Pointers | 11. Container With Most Water |
Shift Zeros to the End | Easy | Two Pointers | 283. Move Zeroes |
Next Lexicographical Sequence | Medium | Two Pointers | 31. Next Permutation |
Pair Sum - Unsorted | Easy | Hash Maps And Sets | 1. Two Sum |
Verify Sudoku Board | Medium | Hash Maps And Sets | 36. Valid Sudoku |
Zero Striping | Medium | Hash Maps And Sets | 73. Set Matrix Zeroes |
Longest Chain of Consecutive Numbers | Medium | Hash Maps And Sets | 128. Longest Consecutive Sequence |
Geometric Sequence Triplets | Medium | Hash Maps And Sets | Not Found |
Linked List Reversal | Easy | Linked Lists | 206. Reverse Linked List |
Remove the Kth Last Node From a Linked List | Medium | Linked Lists | 19. Remove Nth Node From End of List |
Linked List Intersection | Easy | Linked Lists | 160. Intersection of Two Linked Lists |
LRU Cache | Hard | Linked Lists | 146. LRU Cache |
Palindromic Linked List | Easy | Linked Lists | 234. Palindrome Linked List |
Flatten a Multi-Level Linked List | Medium | Linked Lists | 430. Flatten a Multilevel Doubly Linked List |
Linked List Loop | Easy | Fast And Slow Pointers | 141. Linked List Cycle |
Linked List Midpoint | Easy | Fast And Slow Pointers | 876. Middle of the Linked List |
Happy Number | Medium | Fast And Slow Pointers | 202. Happy Number |
Substring Anagrams | Medium | Sliding Window | 438. Find All Anagrams in a String |
Longest Substring With Unique Characters | Medium | Sliding Window | 3. Longest Substring Without Repeating Characters |
Longest Uniform Substring After Replacements | Hard | Sliding Window | 424. Longest Repeating Character Replacement |
Find the Insertion Index | Easy | Binary Search | 35. Search Insert Position |
First and Last Occurrences of a Number | Medium | Binary Search | 34. Find First and Last Position of Element in Sorted Array |
Cutting Wood | Medium | Binary Search | Not Found |
Find the Target in a Rotated Sorted Array | Medium | Binary Search | 33. Search in Rotated Sorted Array |
Find the Median From Two Sorted Arrays | Hard | Binary Search | 4. Median of Two Sorted Arrays |
Matrix Search | Medium | Binary Search | 74. Search a 2D Matrix |
Local Maxima in Array | Medium | Binary Search | 162. Find Peak Element |
Weighted Random Selection | Medium | Binary Search | 528. Random Pick with Weight |
Valid Parenthesis Expression | Easy | Stacks | 20. Valid Parentheses |
Next Largest Number to the Right | Medium | Stacks | 496. Next Greater Element I |
Evaluate Expression | Hard | Stacks | 150. Evaluate Reverse Polish Notation |
Repeated Removal of Adjacent Duplicates | Easy | Stacks | 1047. Remove All Adjacent Duplicates In String |
Implement a Queue using Stacks | Medium | Stacks | 232. Implement Queue using Stacks |
Maximums of Sliding Window | Hard | Stacks | 239. Sliding Window Maximum |
K Most Frequent Strings | Medium | Heaps | 692. Top K Frequent Words |
Combine Sorted Linked Lists | Medium | Heaps | 23. Merge k Sorted Lists |
Median of an Integer Stream | Hard | Heaps | 295. Find Median from Data Stream |
Sort a K-Sorted Array | Medium | Heaps | 912. Sort an Array |
Merge Overlapping Intervals | Medium | Intervals | 56. Merge Intervals |
Identify All Interval Overlaps | Medium | Intervals | 986. Interval List Intersections |
Largest Overlap of Intervals | Medium | Intervals | 435. Non-overlapping Intervals |
Sum Between Range | Easy | Prefix Sums | 303. Range Sum Query - Immutable |
K-Sum Subarrays | Medium | Prefix Sums | 560. Subarray Sum Equals K |
Product Array Without Current Element | Medium | Prefix Sums | 238. Product of Array Except Self |
Invert Binary Tree | Easy | Trees | 226. Invert Binary Tree |
Balanced Binary Tree Validation | Easy | Trees | 110. Balanced Binary Tree |
Rightmost Nodes of a Binary Tree | Medium | Trees | 199. Binary Tree Right Side View |
Widest Binary Tree Level | Medium | Trees | 662. Maximum Width of Binary Tree |
Binary Search Tree Validation | Medium | Trees | 98. Validate Binary Search Tree |
Lowest Common Ancestor | Medium | Trees | 236. Lowest Common Ancestor of a Binary Tree |
Build Binary Tree From Preorder and Inorder Traversals | Medium | Trees | 105. Construct Binary Tree from Preorder and Inorder Traversal |
Maximum Sum of a Continuous Path in a Binary Tree | Hard | Trees | 124. Binary Tree Maximum Path Sum |
Binary Tree Symmetry | Medium | Trees | 101. Symmetric Tree |
Binary Tree Columns | Medium | Trees | 987. Vertical Order Traversal of a Binary Tree |
Kth Smallest Number in a Binary Search Tree | Medium | Trees | 230. Kth Smallest Element in a BST |
Serialize and Deserialize a Binary Tree | Medium | Trees | 297. Serialize and Deserialize Binary Tree |
Design a Trie | Medium | Tries | 208. Implement Trie (Prefix Tree) |
Insert and Search Words with Wildcards | Medium | Tries | 211. Add and Search Word - Data structure design |
Find All Words on a Board | Hard | Tries | 212. Word Search II |
Graph Deep Copy | Medium | Graphs | 133. Clone Graph |
Count Islands | Medium | Graphs | 200. Number of Islands |
Matrix Infection | Medium | Graphs | 994. Rotting Oranges |
Bipartite Graph Validation | Medium | Graphs | 785. Is Graph Bipartite? |
Longest Increasing Path | Medium | Graphs | 329. Longest Increasing Path in a Matrix |
Shortest Transformation Sequence | Hard | Graphs | 127. Word Ladder |
Merging Communities | Hard | Graphs | 684. Redundant Connection |
Prerequisites | Medium | Graphs | 207. Course Schedule |
Shortest Path | Hard | Graphs | 743. Network Delay Time |
Connect the Dots | Medium | Graphs | 323. Number of Connected Components in an Undirected Graph |
Find All Permutations | Medium | Backtracking | 46. Permutations |
Find All Subsets | Medium | Backtracking | 78. Subsets |
N Queens | Hard | Backtracking | 51. N-Queens |
Combinations of a Sum | Medium | Backtracking | 39. Combination Sum |
Phone Keypad Combinations | Medium | Backtracking | 17. Letter Combinations of a Phone Number |
Climbing Stairs | Easy | Dynamic Programming | 70. Climbing Stairs |
Minimum Coin Combination | Medium | Dynamic Programming | 322. Coin Change |
Matrix Pathways | Medium | Dynamic Programming | 62. Unique Paths |
Neighborhood Burglary | Medium | Dynamic Programming | 198. House Robber |
Longest Common Subsequence | Hard | Dynamic Programming | 1143. Longest Common Subsequence |
Longest Palindrome in a String | Medium | Dynamic Programming | 5. Longest Palindromic Substring |
Maximum Subarray Sum | Medium | Dynamic Programming | 53. Maximum Subarray |
0/1 Knapsack | Hard | Dynamic Programming | 474. Ones and Zeroes |
Largest Square in a Matrix | Medium | Dynamic Programming | 221. Maximal Square |
Jump to the End | Medium | Greedy | 55. Jump Game |
Gas Stations | Hard | Greedy | 134. Gas Station |
Candies | Medium | Greedy | 135. Candy |
Sort Linked List | Medium | Sort And Search | 148. Sort List |
Sort Array | Medium | Sort And Search | 912. Sort an Array |
Kth Largest Integer | Medium | Sort And Search | 215. Kth Largest Element in an Array |
Dutch National Flag | Medium | Sort And Search | 75. Sort Colors |
Hamming Weights of Integers | Easy | Bit Manipulation | 191. Number of 1 Bits |
Lonely Integer | Easy | Bit Manipulation | 136. Single Number |
Swap Odd and Even Bits | Medium | Bit Manipulation | 777. Swap Adjacent in LR String |
Spiral Traversal | Medium | Math And Geometry | 54. Spiral Matrix |
Reverse 32-Bit Integer | Medium | Math And Geometry | 7. Reverse Integer |
Maximum Collinear Points | Hard | Math And Geometry | 149. Max Points on a Line |
The Josephus Problem | Medium | Math And Geometry | 1823. Find the Winner of the Circular Game |
Triangle Numbers | Medium | Math And Geometry | 118. Pascal’s Triangle |
The problem list in CSV format.
problem,difficulty,category,leetcode_link,leetcode_title
Pair Sum - Sorted,Easy,Two Pointers,https://leetcode.com/problems/two-sum-ii-input-array-is-sorted,167. Two Sum II - Input Array Is Sorted
Triplet Sum,Medium,Two Pointers,https://leetcode.com/problems/3sum,15. 3Sum
Is Palindrome Valid,Easy,Two Pointers,https://leetcode.com/problems/valid-palindrome,125. Valid Palindrome
Largest Container,Medium,Two Pointers,https://leetcode.com/problems/container-with-most-water,11. Container With Most Water
Shift Zeros to the End,Easy,Two Pointers,https://leetcode.com/problems/move-zeroes,283. Move Zeroes
Next Lexicographical Sequence,Medium,Two Pointers,https://leetcode.com/problems/next-permutation,31. Next Permutation
Pair Sum - Unsorted,Easy,Hash Maps And Sets,https://leetcode.com/problems/two-sum,1. Two Sum
Verify Sudoku Board,Medium,Hash Maps And Sets,https://leetcode.com/problems/valid-sudoku,36. Valid Sudoku
Zero Striping,Medium,Hash Maps And Sets,https://leetcode.com/problems/set-matrix-zeroes/,73. Set Matrix Zeroes
Longest Chain of Consecutive Numbers,Medium,Hash Maps And Sets,https://leetcode.com/problems/longest-consecutive-sequence,128. Longest Consecutive Sequence
Geometric Sequence Triplets,Medium,Hash Maps And Sets,https://leetcode.com/problems/geometric-progression-series,Not Found
Linked List Reversal,Easy,Linked Lists,https://leetcode.com/problems/reverse-linked-list,206. Reverse Linked List
Remove the Kth Last Node From a Linked List,Medium,Linked Lists,https://leetcode.com/problems/remove-nth-node-from-end-of-list,19. Remove Nth Node From End of List
Linked List Intersection,Easy,Linked Lists,https://leetcode.com/problems/intersection-of-two-linked-lists,160. Intersection of Two Linked Lists
LRU Cache,Hard,Linked Lists,https://leetcode.com/problems/lru-cache,146. LRU Cache
Palindromic Linked List,Easy,Linked Lists,https://leetcode.com/problems/palindrome-linked-list,234. Palindrome Linked List
Flatten a Multi-Level Linked List,Medium,Linked Lists,https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list,430. Flatten a Multilevel Doubly Linked List
Linked List Loop,Easy,Fast And Slow Pointers,https://leetcode.com/problems/linked-list-cycle,141. Linked List Cycle
Linked List Midpoint,Easy,Fast And Slow Pointers,https://leetcode.com/problems/middle-of-the-linked-list,876. Middle of the Linked List
Happy Number,Medium,Fast And Slow Pointers,https://leetcode.com/problems/happy-number,202. Happy Number
Substring Anagrams,Medium,Sliding Window,https://leetcode.com/problems/find-all-anagrams-in-a-string,438. Find All Anagrams in a String
Longest Substring With Unique Characters,Medium,Sliding Window,https://leetcode.com/problems/longest-substring-without-repeating-characters,3. Longest Substring Without Repeating Characters
Longest Uniform Substring After Replacements,Hard,Sliding Window,https://leetcode.com/problems/longest-repeating-character-replacement,424. Longest Repeating Character Replacement
Find the Insertion Index,Easy,Binary Search,https://leetcode.com/problems/search-insert-position,35. Search Insert Position
First and Last Occurrences of a Number,Medium,Binary Search,https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array,34. Find First and Last Position of Element in Sorted Array
Cutting Wood,Medium,Binary Search,https://leetcode.com/problems/cutting-wood,Not Found
Find the Target in a Rotated Sorted Array,Medium,Binary Search,https://leetcode.com/problems/search-in-rotated-sorted-array,33. Search in Rotated Sorted Array
Find the Median From Two Sorted Arrays,Hard,Binary Search,https://leetcode.com/problems/median-of-two-sorted-arrays,4. Median of Two Sorted Arrays
Matrix Search,Medium,Binary Search,https://leetcode.com/problems/search-a-2d-matrix,74. Search a 2D Matrix
Local Maxima in Array,Medium,Binary Search,https://leetcode.com/problems/find-peak-element,162. Find Peak Element
Weighted Random Selection,Medium,Binary Search,https://leetcode.com/problems/random-pick-with-weight,528. Random Pick with Weight
Valid Parenthesis Expression,Easy,Stacks,https://leetcode.com/problems/valid-parentheses,20. Valid Parentheses
Next Largest Number to the Right,Medium,Stacks,https://leetcode.com/problems/next-greater-element-i,496. Next Greater Element I
Evaluate Expression,Hard,Stacks,https://leetcode.com/problems/evaluate-reverse-polish-notation,150. Evaluate Reverse Polish Notation
Repeated Removal of Adjacent Duplicates,Easy,Stacks,https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string,1047. Remove All Adjacent Duplicates In String
Implement a Queue using Stacks,Medium,Stacks,https://leetcode.com/problems/implement-queue-using-stacks,232. Implement Queue using Stacks
Maximums of Sliding Window,Hard,Stacks,https://leetcode.com/problems/sliding-window-maximum,239. Sliding Window Maximum
K Most Frequent Strings,Medium,Heaps,https://leetcode.com/problems/top-k-frequent-words,692. Top K Frequent Words
Combine Sorted Linked Lists,Medium,Heaps,https://leetcode.com/problems/merge-k-sorted-lists,23. Merge k Sorted Lists
Median of an Integer Stream,Hard,Heaps,https://leetcode.com/problems/find-median-from-data-stream,295. Find Median from Data Stream
Sort a K-Sorted Array,Medium,Heaps,https://leetcode.com/problems/sort-an-array,912. Sort an Array
Merge Overlapping Intervals,Medium,Intervals,https://leetcode.com/problems/merge-intervals,56. Merge Intervals
Identify All Interval Overlaps,Medium,Intervals,https://leetcode.com/problems/interval-list-intersections,986. Interval List Intersections
Largest Overlap of Intervals,Medium,Intervals,https://leetcode.com/problems/non-overlapping-intervals,435. Non-overlapping Intervals
Sum Between Range,Easy,Prefix Sums,https://leetcode.com/problems/range-sum-query-immutable,303. Range Sum Query - Immutable
K-Sum Subarrays,Medium,Prefix Sums,https://leetcode.com/problems/subarray-sum-equals-k,560. Subarray Sum Equals K
Product Array Without Current Element,Medium,Prefix Sums,https://leetcode.com/problems/product-of-array-except-self,238. Product of Array Except Self
Invert Binary Tree,Easy,Trees,https://leetcode.com/problems/invert-binary-tree,226. Invert Binary Tree
Balanced Binary Tree Validation,Easy,Trees,https://leetcode.com/problems/balanced-binary-tree,110. Balanced Binary Tree
Rightmost Nodes of a Binary Tree,Medium,Trees,https://leetcode.com/problems/binary-tree-right-side-view,199. Binary Tree Right Side View
Widest Binary Tree Level,Medium,Trees,https://leetcode.com/problems/maximum-width-of-binary-tree,662. Maximum Width of Binary Tree
Binary Search Tree Validation,Medium,Trees,https://leetcode.com/problems/validate-binary-search-tree,98. Validate Binary Search Tree
Lowest Common Ancestor,Medium,Trees,https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree,236. Lowest Common Ancestor of a Binary Tree
Build Binary Tree From Preorder and Inorder Traversals,Medium,Trees,https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal,105. Construct Binary Tree from Preorder and Inorder Traversal
Maximum Sum of a Continuous Path in a Binary Tree,Hard,Trees,https://leetcode.com/problems/binary-tree-maximum-path-sum,124. Binary Tree Maximum Path Sum
Binary Tree Symmetry,Medium,Trees,https://leetcode.com/problems/symmetric-tree,101. Symmetric Tree
Binary Tree Columns,Medium,Trees,https://leetcode.com/problems/vertical-order-traversal-of-a-binary-tree,987. Vertical Order Traversal of a Binary Tree
Kth Smallest Number in a Binary Search Tree,Medium,Trees,https://leetcode.com/problems/kth-smallest-element-in-a-bst,230. Kth Smallest Element in a BST
Serialize and Deserialize a Binary Tree,Medium,Trees,https://leetcode.com/problems/serialize-and-deserialize-binary-tree,297. Serialize and Deserialize Binary Tree
Design a Trie,Medium,Tries,https://leetcode.com/problems/implement-trie-prefix-tree,208. Implement Trie (Prefix Tree)
Insert and Search Words with Wildcards,Medium,Tries,https://leetcode.com/problems/add-and-search-word-data-structure-design,211. Add and Search Word - Data structure design
Find All Words on a Board,Hard,Tries,https://leetcode.com/problems/word-search-ii,212. Word Search II
Graph Deep Copy,Medium,Graphs,https://leetcode.com/problems/clone-graph,133. Clone Graph
Count Islands,Medium,Graphs,https://leetcode.com/problems/number-of-islands,200. Number of Islands
Matrix Infection,Medium,Graphs,https://leetcode.com/problems/rotting-oranges,994. Rotting Oranges
Bipartite Graph Validation,Medium,Graphs,https://leetcode.com/problems/is-graph-bipartite,785. Is Graph Bipartite?
Longest Increasing Path,Medium,Graphs,https://leetcode.com/problems/longest-increasing-path-in-a-matrix,329. Longest Increasing Path in a Matrix
Shortest Transformation Sequence,Hard,Graphs,https://leetcode.com/problems/word-ladder,127. Word Ladder
Merging Communities,Hard,Graphs,https://leetcode.com/problems/redundant-connection,684. Redundant Connection
Prerequisites,Medium,Graphs,https://leetcode.com/problems/course-schedule,207. Course Schedule
Shortest Path,Hard,Graphs,https://leetcode.com/problems/network-delay-time,743. Network Delay Time
Connect the Dots,Medium,Graphs,https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph,323. Number of Connected Components in an Undirected Graph
Find All Permutations,Medium,Backtracking,https://leetcode.com/problems/permutations,46. Permutations
Find All Subsets,Medium,Backtracking,https://leetcode.com/problems/subsets,78. Subsets
N Queens,Hard,Backtracking,https://leetcode.com/problems/n-queens,51. N-Queens
Combinations of a Sum,Medium,Backtracking,https://leetcode.com/problems/combination-sum,39. Combination Sum
Phone Keypad Combinations,Medium,Backtracking,https://leetcode.com/problems/letter-combinations-of-a-phone-number,17. Letter Combinations of a Phone Number
Climbing Stairs,Easy,Dynamic Programming,https://leetcode.com/problems/climbing-stairs,70. Climbing Stairs
Minimum Coin Combination,Medium,Dynamic Programming,https://leetcode.com/problems/coin-change,322. Coin Change
Matrix Pathways,Medium,Dynamic Programming,https://leetcode.com/problems/unique-paths,62. Unique Paths
Neighborhood Burglary,Medium,Dynamic Programming,https://leetcode.com/problems/house-robber,198. House Robber
Longest Common Subsequence,Hard,Dynamic Programming,https://leetcode.com/problems/longest-common-subsequence,1143. Longest Common Subsequence
Longest Palindrome in a String,Medium,Dynamic Programming,https://leetcode.com/problems/longest-palindromic-substring,5. Longest Palindromic Substring
Maximum Subarray Sum,Medium,Dynamic Programming,https://leetcode.com/problems/maximum-subarray,53. Maximum Subarray
0/1 Knapsack,Hard,Dynamic Programming,https://leetcode.com/problems/ones-and-zeroes,474. Ones and Zeroes
Largest Square in a Matrix,Medium,Dynamic Programming,https://leetcode.com/problems/maximal-square,221. Maximal Square
Jump to the End,Medium,Greedy,https://leetcode.com/problems/jump-game,55. Jump Game
Gas Stations,Hard,Greedy,https://leetcode.com/problems/gas-station,134. Gas Station
Candies,Medium,Greedy,https://leetcode.com/problems/candy,135. Candy
Sort Linked List,Medium,Sort And Search,https://leetcode.com/problems/sort-list,148. Sort List
Sort Array,Medium,Sort And Search,https://leetcode.com/problems/sort-an-array,912. Sort an Array
Kth Largest Integer,Medium,Sort And Search,https://leetcode.com/problems/kth-largest-element-in-an-array,215. Kth Largest Element in an Array
Dutch National Flag,Medium,Sort And Search,https://leetcode.com/problems/sort-colors,75. Sort Colors
Hamming Weights of Integers,Easy,Bit Manipulation,https://leetcode.com/problems/number-of-1-bits,191. Number of 1 Bits
Lonely Integer,Easy,Bit Manipulation,https://leetcode.com/problems/single-number,136. Single Number
Swap Odd and Even Bits,Medium,Bit Manipulation,https://leetcode.com/problems/swap-adjacent-in-lr-string,777. Swap Adjacent in LR String
Spiral Traversal,Medium,Math And Geometry,https://leetcode.com/problems/spiral-matrix,54. Spiral Matrix
Reverse 32-Bit Integer,Medium,Math And Geometry,https://leetcode.com/problems/reverse-integer,7. Reverse Integer
Maximum Collinear Points,Hard,Math And Geometry,https://leetcode.com/problems/max-points-on-a-line,149. Max Points on a Line
The Josephus Problem,Medium,Math And Geometry,https://leetcode.com/problems/find-the-winner-of-the-circular-game,1823. Find the Winner of the Circular Game
Triangle Numbers,Medium,Math And Geometry,https://leetcode.com/problems/pascals-triangle,118. Pascal's Triangle