Fanpilot

PatternsPractice and reference

Problem index

Chapter 32 of 323 min read

Every LeetCode problem mentioned in this guide, linked to its statement on LeetCode. The numbers are LeetCode's, not an order to solve them in. Try each problem before you open its solution.

ID Original problem statement
1 Two Sum
3 Longest Substring Without Repeating Characters
5 Longest Palindromic Substring
11 Container With Most Water
15 3Sum
19 Remove Nth Node From End of List
20 Valid Parentheses
21 Merge Two Sorted Lists
22 Generate Parentheses
23 Merge k Sorted Lists
26 Remove Duplicates from Sorted Array
28 Find the Index of the First Occurrence in a String
33 Search in Rotated Sorted Array
34 Find First and Last Position of Element in Sorted Array
35 Search Insert Position
39 Combination Sum
45 Jump Game II
46 Permutations
47 Permutations II
49 Group Anagrams
50 Pow(x, n)
51 N-Queens
55 Jump Game
56 Merge Intervals
57 Insert Interval
70 Climbing Stairs
72 Edit Distance
76 Minimum Window Substring
78 Subsets
79 Word Search
84 Largest Rectangle in Histogram
98 Validate Binary Search Tree
104 Maximum Depth of Binary Tree
110 Balanced Binary Tree
127 Word Ladder
128 Longest Consecutive Sequence
131 Palindrome Partitioning
133 Clone Graph
136 Single Number
139 Word Break
141 Linked List Cycle
142 Linked List Cycle II
146 LRU Cache
155 Min Stack
167 Two Sum II - Input Array Is Sorted
191 Number of 1 Bits
198 House Robber
200 Number of Islands
201 Bitwise AND of Numbers Range
206 Reverse Linked List
207 Course Schedule
208 Implement Trie (Prefix Tree)
209 Minimum Size Subarray Sum
210 Course Schedule II
211 Design Add and Search Words Data Structure
212 Word Search II
215 Kth Largest Element in an Array
218 The Skyline Problem
232 Implement Queue using Stacks
236 Lowest Common Ancestor of a Binary Tree
238 Product of Array Except Self
239 Sliding Window Maximum
242 Valid Anagram
295 Find Median from Data Stream
300 Longest Increasing Subsequence
303 Range Sum Query - Immutable
307 Range Sum Query - Mutable
309 Best Time to Buy and Sell Stock with Cooldown
312 Burst Balloons
315 Count of Smaller Numbers After Self
322 Coin Change
327 Count of Range Sum
329 Longest Increasing Path in a Matrix
332 Reconstruct Itinerary
337 House Robber III
338 Counting Bits
347 Top K Frequent Elements
377 Combination Sum IV
380 Insert Delete GetRandom O(1)
416 Partition Equal Subset Sum
424 Longest Repeating Character Replacement
435 Non-overlapping Intervals
452 Minimum Number of Arrows to Burst Balloons
486 Predict the Winner
493 Reverse Pairs
494 Target Sum
496 Next Greater Element I
518 Coin Change II
525 Contiguous Array
543 Diameter of Binary Tree
547 Number of Provinces
560 Subarray Sum Equals K
643 Maximum Average Subarray I
684 Redundant Connection
703 Kth Largest Element in a Stream
704 Binary Search
718 Maximum Length of Repeated Subarray
721 Accounts Merge
739 Daily Temperatures
743 Network Delay Time
746 Min Cost Climbing Stairs
752 Open the Lock
787 Cheapest Flights Within K Stops
834 Sum of Distances in Tree
862 Shortest Subarray with Sum at Least K
864 Shortest Path to Get All Keys
875 Koko Eating Bananas
907 Sum of Subarray Minimums
974 Subarray Sums Divisible by K
981 Time Based Key-Value Store
994 Rotting Oranges
1011 Capacity To Ship Packages Within D Days
1109 Corporate Flight Bookings
1143 Longest Common Subsequence
1192 Critical Connections in a Network
1235 Maximum Profit in Job Scheduling
1368 Minimum Cost to Make at Least One Valid Path in a Grid
1392 Longest Happy Prefix
1483 Kth Ancestor of a Tree Node
1584 Min Cost to Connect All Points
1631 Path With Minimum Effort
1755 Closest Subsequence Sum
1851 Minimum Interval to Include Each Query
2035 Partition Array Into Two Arrays to Minimize Sum Difference
2376 Count Special Integers