Appendix B — Appendix B: LeetCode Index
Appendix B: LeetCode Index
Every LeetCode problem referenced in this book, organized by chapter. Each links to the problem; many also have my own submission archive at ~/leetcode-submissions/ for comparison.
B.1 Problems by chapter
B.1.1 Chapter 2 — STL vector
- Find the Middle Index in Array (#1991)
- Smallest Index With Equal Value (#2057)
- Running Sum of 1d Array (#1480)
- Build Array from Permutation (#1920)
- Concatenation of Array (#1929)
B.1.2 Chapter 3 — STL set/map/stack/queue
- Find All Duplicates in an Array (#442)
- Two Sum (#1)
- Valid Parentheses (#20)
- Top K Frequent Elements (#347)
- Number of Recent Calls (#933)
B.1.3 Chapter 4 — Pointers
- Palindrome Number (#9)
- Remove Element (#27)
- Reverse String (#344)
- Merge Sorted Array (#88)
- Linked List Cycle (#141)
B.1.4 Chapter 5 — Classes
- Implement strStr() (#28)
B.1.5 Chapter 8 — Templates
- Binary Search (#704)
B.1.6 Chapter 9 — Recursion
- Climbing Stairs (#70)
- Power of Two (#231)
- Fibonacci Number (#509)
- Reverse Linked List (#206)
- Sum of Digits of String After Convert (#1945)
B.1.7 Chapter 14 — Sorting
- Sort Colors (#75)
- Merge Two Sorted Lists (#21)
- Sort an Array (#912)
B.1.8 Chapter 16 — Linked Lists
- Middle of the Linked List (#876)
- Linked List Cycle (#141)
- Palindrome Linked List (#234)
B.1.9 Chapter 17 — Binary Trees Intro
- Maximum Depth of Binary Tree (#104)
- Validate Binary Search Tree (#98)
- Same Tree (#100)
- Invert Binary Tree (#226)
- Path Sum (#112)
B.1.10 Chapter 18 — Advanced Recursion
- Symmetric Tree (#101)
- Subsets (#78)
- Lowest Common Ancestor of BST (#235)
- Diameter of Binary Tree (#543)
B.1.11 Chapter 22 — Trees revisited
B.1.12 Chapter 23 — BST delete
- Delete Node in a BST (#450)
- Path Sum II (#113)
- Sum Root to Leaf Numbers (#129)
B.1.13 Chapter 25 — Heaps
- Kth Largest Element in an Array (#215)
- Kth Largest Element in a Stream (#703)
- Merge k Sorted Lists (#23)
- Find Median from Data Stream (#295)
B.1.14 Chapter 26 — Graphs BFS/DFS
- Number of Islands (#200)
- Flood Fill (#733)
- Number of Connected Components in an Undirected Graph (#323)
- Course Schedule (#207)
B.1.15 Chapter 27 — Shortest paths and MST
- Clone Graph (#133)
- Network Delay Time (#743)
- Min Cost to Connect All Points (#1584)
- Course Schedule II (#210)
- Cheapest Flights Within K Stops (#787)
B.1.16 Chapter 28 — Hash tables
- Group Anagrams (#49)
- LRU Cache (#146)
- Longest Substring Without Repeating Characters (#3)
B.1.17 Chapter 29 — Balanced trees
B.1.18 Chapter 31 — Divide and conquer
- Merge k Sorted Lists (#23)
- Pow(x, n) (#50)
- Count of Smaller Numbers After Self (#315)
B.1.19 Chapter 32 — Greedy
- Assign Cookies (#455)
- Jump Game (#55)
- Jump Game II (#45)
- Gas Station (#134)
- Best Time to Buy and Sell Stock II (#122)
- Task Scheduler (#621)
B.1.20 Chapter 33 — DP I
- Coin Change (#322)
- House Robber (#198)
- House Robber II (#213)
- Partition Equal Subset Sum (#416)
- Min Cost Climbing Stairs (#746)
B.1.21 Chapter 34 — DP II
- Unique Paths (#62)
- Unique Paths II (#63)
- Longest Common Subsequence (#1143)
- Edit Distance (#72)
- Longest Increasing Subsequence (#300)
- Word Break (#139)
B.1.22 Chapter 37 — Regex
- Longest Common Prefix (#14)
B.2 By difficulty (rough)
B.2.1 Easy
- #1 Two Sum
- #9 Palindrome Number
- #20 Valid Parentheses
- #21 Merge Two Sorted Lists
- #70 Climbing Stairs
- #88 Merge Sorted Array
- #104 Maximum Depth of Binary Tree
- #141 Linked List Cycle
- #198 House Robber
- #206 Reverse Linked List
- #226 Invert Binary Tree
- #344 Reverse String
- #509 Fibonacci Number
- #704 Binary Search
- #876 Middle of the Linked List
B.2.2 Medium
- #3 Longest Substring Without Repeating Characters
- #45 Jump Game II
- #49 Group Anagrams
- #62 Unique Paths
- #75 Sort Colors
- #78 Subsets
- #98 Validate BST
- #102 Level Order Traversal
- #122 Best Time to Buy and Sell Stock II
- #133 Clone Graph
- #134 Gas Station
- #146 LRU Cache
- #200 Number of Islands
- #207 Course Schedule
- #210 Course Schedule II
- #215 Kth Largest
- #300 Longest Increasing Subsequence
- #322 Coin Change
- #347 Top K Frequent
- #416 Partition Equal Subset Sum
- #450 Delete BST Node
- #543 Diameter of Binary Tree
- #621 Task Scheduler
- #743 Network Delay
- #912 Sort an Array
- #1143 Longest Common Subsequence
- #1584 Min Cost to Connect All Points
B.2.3 Hard
- #23 Merge k Sorted Lists
- #72 Edit Distance
- #295 Find Median from Data Stream
- #315 Count of Smaller Numbers After Self
- #787 Cheapest Flights Within K Stops
B.3 Where to find my submissions
Most of the problems above I have submitted multiple times over the years. Solutions live in ~/leetcode-submissions/ organized by problem slug. Filenames are timestamped, so the latest file is usually the cleanest. Older ones often show the evolution — first attempt, optimized version, alternative approach.