InterviewKata
Interview preparation

Amazon interview problems, by pattern

All 725 problems from Amazon's six-month LeetCode list (210 Easy, 396 Medium, 119 Hard), grouped by the pattern that solves them. 553 are solved on this site: open one to see which pattern to choose and why, the approach, the code with a line-by-line explanation, and a player that steps through the code on LeetCode's own example. Easy warm-ups and SQL/JavaScript problems link to LeetCode.

On the pattern pages these problems carry a Amazon badge. Frequency is LeetCode's relative score for this list (100 = asked most often). Read a pattern page first, then work through its group here from the most to the least frequent problem.

A 6-month plan

About 5–6 problems on 5 days a week. Each month: read the pattern page, solve its worked examples without looking, then this list. Re-solve anything you needed a hint for one week later.

WhenFocusPatterns (problems on the list)Total
Month 1Foundations: arrays you can scan01 · Prefix Sum (26)
02 · Two Pointers (47)
03 · Sliding Window (34)
04 · Fast & Slow Pointers (12)
05 · LinkedList In-place Reversal (18)
21 · Array & String Basics (57)
194
Month 2Stacks, heaps, intervals, binary search06 · Monotonic Stack (22)
07 · Top 'K' Elements (26)
08 · Overlapping Intervals (14)
09 · Modified Binary Search (41)
17 · Stack (22)
125
Month 3Trees and graphs10 · Binary Tree Traversal (43)
11 · Depth-First Search (DFS) on Graphs (19)
12 · Breadth-First Search (BFS) (21)
13 · Matrix Traversal (26)
23 · Union-Find (Disjoint Set Union) (8)
117
Month 4Search and dynamic programming14 · Backtracking (24)
15 · Dynamic Programming Patterns (86)
110
Month 5Hashing, greedy, design, weighted graphs16 · Hash Map & Set (38)
18 · Greedy (41)
19 · Trie & Design (23)
20 · Shortest Path & MST (6)
108
Month 6Math, range structures, then mock interviews22 · Math & Bit Manipulation (50)
24 · Segment Tree & Fenwick Tree (5)
55

In the last two weeks, filter to Hard, sort your attention by frequency, and do timed mock interviews: 45 minutes, talk through the brute force, name the pattern, then code it.

All problems

01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 SQL/JS

01 · Prefix Sum 26

22 solved on the pattern page (step-by-step explanation and a step-through player), 4 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
560Subarray Sum Equals KMedium69Array, Hash Table, Prefix Sum
238Product of Array Except SelfMedium57Array, Prefix Sum
1480Running Sum of 1d ArrayEasy45Array, Prefix Sum
528Random Pick with WeightMedium39Array, Math, Binary Search, Prefix Sum, Randomized
3699Number of ZigZag Arrays IHard34Dynamic Programming, Prefix Sum
303Range Sum Query - ImmutableEasy30Array, Design, Prefix Sum
724Find Pivot IndexEasy30Array, Prefix Sum
437Path Sum IIIMedium30Tree, Depth-First Search, Binary Tree
525Contiguous ArrayMedium26Array, Hash Table, Prefix Sum
1674Minimum Moves to Make Array ComplementaryMedium26Array, Hash Table, Prefix Sum
3737Count Subarrays With Majority Element IMedium26Array, Hash Table, Divide and Conquer, Segment Tree, Merge Sort, Counting, Prefix Sum
974Subarray Sums Divisible by KMedium26Array, Hash Table, Prefix Sum
2488Count Subarrays With Median KHard21Array, Hash Table, Prefix Sum
304Range Sum Query 2D - ImmutableMedium21Array, Design, Matrix, Prefix Sum
3026Maximum Good Subarray SumMedium21Array, Hash Table, Prefix Sum
2615Sum of DistancesMedium21Array, Hash Table, Prefix Sum
1248Count Number of Nice SubarraysMedium21Array, Hash Table, Math, Sliding Window, Prefix Sum
2574Left and Right Sum DifferencesEasy21Array, Prefix Sum
3212Count Submatrices With Equal Frequency of X and YMedium14Array, Matrix, Prefix Sum
3655XOR After Range Multiplication Queries IIHard14Array, Divide and Conquer, Prefix Sum
1732Find the Highest AltitudeEasy14Array, Prefix Sum
2055Plates Between CandlesMedium14Array, String, Binary Search, Prefix Sum
3756Concatenate Non-Zero Digits and Multiply by Sum IIMedium14Math, String, Prefix Sum
3653XOR After Range Multiplication Queries IMedium14Array, Divide and Conquer, Simulation, Prefix Sum
862Shortest Subarray with Sum at Least KHard14Array, Binary Search, Queue, Sliding Window, Heap (Priority Queue), Prefix Sum, Monotonic Queue
1314Matrix Block SumMedium14Array, Matrix, Prefix Sum

02 · Two Pointers 47

35 solved on the pattern page (step-by-step explanation and a step-through player), 12 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
42Trapping Rain WaterHard86Array, Two Pointers, Dynamic Programming, Stack, Monotonic Stack
153SumMedium75Array, Two Pointers, Sorting
4Median of Two Sorted ArraysHard74Array, Binary Search, Divide and Conquer
5Longest Palindromic SubstringMedium73Two Pointers, String, Dynamic Programming, Manacher
11Container With Most WaterMedium69Array, Two Pointers, Greedy
26Remove Duplicates from Sorted ArrayEasy62Array, Two Pointers
75Sort ColorsMedium60Array, Two Pointers, Sorting, Quicksort, Bubble Sort
31Next PermutationMedium59Array, Two Pointers
184SumMedium58Array, Two Pointers, Sorting
88Merge Sorted ArrayEasy57Array, Two Pointers, Sorting
125Valid PalindromeEasy56Two Pointers, String
27Remove ElementEasy55Array, Two Pointers
163Sum ClosestMedium54Array, Two Pointers, Sorting
283Move ZeroesEasy54Array, Two Pointers
167Two Sum II - Input Array Is SortedMedium51Array, Two Pointers, Binary Search
977Squares of a Sorted ArrayEasy50Array, Two Pointers, Sorting
344Reverse StringEasy47Two Pointers, String
443String CompressionMedium47Two Pointers, String
189Rotate ArrayMedium45Array, Math, Two Pointers
881Boats to Save PeopleMedium45Array, Two Pointers, Greedy, Sorting, Timsort
80Remove Duplicates from Sorted Array IIMedium39Array, Two Pointers
1768Merge Strings AlternatelyEasy39Two Pointers, String
455Assign CookiesEasy39Array, Two Pointers, Greedy, Sorting, Quicksort
345Reverse Vowels of a StringEasy36Two Pointers, String
680Valid Palindrome IIEasy36Two Pointers, String, Greedy
557Reverse Words in a String IIIEasy36Two Pointers, String
392Is SubsequenceEasy34Two Pointers, String, Dynamic Programming
2149Rearrange Array Elements by SignMedium30Array, Two Pointers, Simulation
160Intersection of Two Linked ListsEasy30Hash Table, Linked List, Two Pointers
696Count Binary SubstringsEasy30Two Pointers, String
3867Sum of GCD of Formed PairsMedium30Array, Math, Two Pointers, Sorting, Simulation, Number Theory
541Reverse String IIEasy26Two Pointers, String
2161Partition Array According to Given PivotMedium26Array, Two Pointers, Simulation
2938Separate Black and White BallsMedium26Two Pointers, String, Greedy
653Two Sum IV - Input is a BSTEasy21Hash Table, Two Pointers, Tree, Depth-First Search, Breadth-First Search, Binary Search Tree, Binary Tree
1679Max Number of K-Sum PairsMedium21Array, Hash Table, Two Pointers, Sorting
633Sum of Square NumbersMedium21Math, Two Pointers, Binary Search
2460Apply Operations to an ArrayEasy21Array, Two Pointers, Simulation
969Pancake SortingMedium21Array, Two Pointers, Greedy, Sorting
165Compare Version NumbersMedium14Two Pointers, String
3752Lexicographically Smallest Negated Permutation that Sums to TargetMedium14Array, Math, Two Pointers, Greedy, Sorting
1574Shortest Subarray to be Removed to Make Array SortedMedium14Array, Two Pointers, Binary Search, Stack, Monotonic Stack
1861Rotating the BoxMedium14Array, Two Pointers, Matrix
277Find the Celebrity PremiumMedium14Two Pointers, Graph Theory, Interactive
821Shortest Distance to a CharacterEasy14Array, Two Pointers, String
611Valid Triangle NumberMedium14Array, Two Pointers, Binary Search, Greedy, Sorting
3302Find the Lexicographically Smallest Valid SequenceMedium14Two Pointers, String, Dynamic Programming, Greedy

03 · Sliding Window 34

31 solved on the pattern page (step-by-step explanation and a step-through player), 3 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
121Best Time to Buy and Sell StockEasy82Array, Dynamic Programming
3Longest Substring Without Repeating CharactersMedium82Hash Table, String, Sliding Window
3413Maximum Coins From K Consecutive BagsMedium69Array, Binary Search, Greedy, Sliding Window, Sorting, Prefix Sum
904Fruit Into BasketsMedium69Array, Hash Table, Sliding Window
76Minimum Window SubstringHard62Hash Table, String, Sliding Window
239Sliding Window MaximumHard60Array, Queue, Sliding Window, Heap (Priority Queue), Monotonic Queue, Range Minimum/Maximum Query
424Longest Repeating Character ReplacementMedium58Hash Table, String, Sliding Window
1004Max Consecutive Ones IIIMedium50Array, Binary Search, Sliding Window, Prefix Sum
643Maximum Average Subarray IEasy45Array, Sliding Window
209Minimum Size Subarray SumMedium43Array, Binary Search, Sliding Window, Prefix Sum
567Permutation in StringMedium41Hash Table, Two Pointers, String, Sliding Window
1838Frequency of the Most Frequent ElementMedium39Array, Binary Search, Greedy, Sliding Window, Sorting, Prefix Sum
219Contains Duplicate IIEasy36Array, Hash Table, Sliding Window
30Substring with Concatenation of All WordsHard36Hash Table, String, Sliding Window
2958Length of Longest Subarray With at Most K FrequencyMedium36Array, Hash Table, Sliding Window
438Find All Anagrams in a StringMedium34Hash Table, String, Sliding Window
992Subarrays with K Different IntegersHard34Array, Hash Table, Sliding Window, Counting
1438Longest Continuous Subarray With Absolute Diff Less Than or Equal to LimitMedium34Array, Queue, Sliding Window, Heap (Priority Queue), Ordered Set, Monotonic Queue
1423Maximum Points You Can Obtain from CardsMedium30Array, Sliding Window, Prefix Sum
395Longest Substring with At Least K Repeating CharactersMedium30Hash Table, String, Divide and Conquer, Sliding Window
713Subarray Product Less Than KMedium26Array, Binary Search, Sliding Window, Prefix Sum
187Repeated DNA SequencesMedium26Hash Table, String, Bit Manipulation, Sliding Window, Rolling Hash, Hash Function, Z Algorithm, Boyer–Moore String-Search Algorithm
1658Minimum Operations to Reduce X to ZeroMedium21Array, Hash Table, Binary Search, Sliding Window, Prefix Sum
1652Defuse the BombEasy21Array, Sliding Window
2762Continuous SubarraysMedium21Array, Queue, Sliding Window, Heap (Priority Queue), Ordered Set, Monotonic Queue
1703Minimum Adjacent Swaps for K Consecutive OnesHard21Array, Greedy, Sliding Window, Prefix Sum
2461Maximum Sum of Distinct Subarrays With Length KMedium21Array, Hash Table, Sliding Window
3090Maximum Length Substring With Two OccurrencesEasy21Hash Table, String, Sliding Window
2653Sliding Subarray BeautyMedium14Array, Hash Table, Sliding Window
2271Maximum White Tiles Covered by a CarpetMedium14Array, Binary Search, Greedy, Sliding Window, Sorting, Prefix Sum
1151Minimum Swaps to Group All 1's Together PremiumMedium14Array, Sliding Window
413Arithmetic SlicesMedium14Array, Dynamic Programming, Sliding Window
2009Minimum Number of Operations to Make Array ContinuousHard14Array, Hash Table, Binary Search, Sliding Window
1876Substrings of Size Three with Distinct CharactersEasy14Hash Table, String, Sliding Window, Counting

04 · Fast & Slow Pointers 12

12 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
19Remove Nth Node From End of ListMedium54Linked List, Two Pointers
234Palindrome Linked ListEasy54Linked List, Two Pointers, Stack, Recursion
41First Missing PositiveHard51Array, Hash Table
287Find the Duplicate NumberMedium48Array, Two Pointers, Binary Search, Bit Manipulation, Pigeonhole Principle, Floyd's Cycle Finding Algorithm
142Linked List Cycle IIMedium47Hash Table, Linked List, Two Pointers, Floyd's Cycle Finding Algorithm
141Linked List CycleEasy43Hash Table, Linked List, Two Pointers, Floyd's Cycle Finding Algorithm
143Reorder ListMedium41Linked List, Two Pointers, Stack, Recursion
202Happy NumberEasy36Hash Table, Math, Two Pointers, Floyd's Cycle Finding Algorithm
876Middle of the Linked ListEasy36Linked List, Two Pointers
148Sort ListMedium34Linked List, Two Pointers, Divide and Conquer, Sorting, Merge Sort
2095Delete the Middle Node of a Linked ListMedium21Linked List, Two Pointers
2130Maximum Twin Sum of a Linked ListMedium14Linked List, Two Pointers, Stack

05 · LinkedList In-place Reversal 18

16 solved on the pattern page (step-by-step explanation and a step-through player), 2 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
2Add Two NumbersMedium79Linked List, Math, Recursion
138Copy List with Random PointerMedium62Hash Table, Linked List
21Merge Two Sorted ListsEasy59Linked List, Recursion
206Reverse Linked ListEasy48Linked List, Recursion
61Rotate ListMedium45Linked List, Two Pointers
25Reverse Nodes in k-GroupHard41Linked List, Recursion
328Odd Even Linked ListMedium41Linked List
92Reverse Linked List IIMedium39Linked List
83Remove Duplicates from Sorted ListEasy39Linked List
86Partition ListMedium36Linked List, Two Pointers
24Swap Nodes in PairsMedium26Linked List, Recursion
706Design HashMapEasy26Array, Hash Table, Linked List, Design, Hash Function
109Convert Sorted List to Binary Search TreeMedium26Linked List, Divide and Conquer, Tree, Binary Search Tree, Binary Tree
82Remove Duplicates from Sorted List IIMedium26Linked List, Two Pointers
237Delete Node in a Linked ListMedium21Linked List
203Remove Linked List ElementsEasy21Linked List, Recursion
147Insertion Sort ListMedium14Linked List, Sorting
1721Swapping Nodes in a Linked ListMedium14Linked List, Two Pointers

06 · Monotonic Stack 22

21 solved on the pattern page (step-by-step explanation and a step-through player), 1 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
84Largest Rectangle in HistogramHard57Array, Stack, Monotonic Stack, Range Minimum/Maximum Query
496Next Greater Element IEasy51Array, Hash Table, Stack, Monotonic Stack
739Daily TemperaturesMedium51Array, Stack, Monotonic Stack
907Sum of Subarray MinimumsMedium48Array, Dynamic Programming, Stack, Monotonic Stack
503Next Greater Element IIMedium47Array, Stack, Monotonic Stack
2281Sum of Total Strength of WizardsHard43Array, Stack, Monotonic Stack, Prefix Sum
402Remove K DigitsMedium39String, Stack, Greedy, Monotonic Stack
1008Construct Binary Search Tree from Preorder TraversalMedium39Array, Stack, Tree, Binary Search Tree, Monotonic Stack, Binary Tree
456132 PatternMedium36Array, Binary Search, Stack, Monotonic Stack, Ordered Set
85Maximal RectangleHard34Array, Dynamic Programming, Stack, Matrix, Monotonic Stack
901Online Stock SpanMedium26Stack, Design, Monotonic Stack, Data Stream
853Car FleetMedium26Array, Stack, Sorting, Monotonic Stack
316Remove Duplicate LettersMedium26String, Stack, Greedy, Monotonic Stack
1081Smallest Subsequence of Distinct CharactersMedium26String, Stack, Greedy, Monotonic Stack
1475Final Prices With a Special Discount in a ShopEasy14Array, Stack, Monotonic Stack
1856Maximum Subarray Min-ProductMedium14Array, Stack, Monotonic Stack, Prefix Sum, Cartesian Tree
1944Number of Visible People in a QueueHard14Array, Stack, Monotonic Stack
962Maximum Width RampMedium14Array, Two Pointers, Stack, Monotonic Stack
2487Remove Nodes From Linked ListMedium14Linked List, Stack, Recursion, Monotonic Stack
975Odd Even JumpHard14Array, Dynamic Programming, Stack, Sorting, Monotonic Stack, Ordered Set
2104Sum of Subarray RangesMedium14Array, Stack, Monotonic Stack
1526Minimum Number of Increments on Subarrays to Form a Target ArrayHard14Array, Dynamic Programming, Stack, Greedy, Monotonic Stack

07 · Top 'K' Elements 26

23 solved on the pattern page (step-by-step explanation and a step-through player), 3 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
23Merge k Sorted ListsHard69Linked List, Divide and Conquer, Heap (Priority Queue), Merge Sort, Tournament Sort
767Reorganize StringMedium68Hash Table, String, Greedy, Sorting, Heap (Priority Queue), Counting
347Top K Frequent ElementsMedium64Array, Hash Table, Divide and Conquer, Sorting, Heap (Priority Queue), Bucket Sort, Counting, Quickselect
621Task SchedulerMedium55Array, Hash Table, Greedy, Sorting, Heap (Priority Queue), Counting
295Find Median from Data StreamHard52Two Pointers, Design, Sorting, Heap (Priority Queue), Data Stream
215Kth Largest Element in an ArrayMedium47Array, Divide and Conquer, Sorting, Heap (Priority Queue), Quickselect
658Find K Closest ElementsMedium34Array, Two Pointers, Binary Search, Sliding Window, Sorting, Heap (Priority Queue)
692Top K Frequent WordsMedium34Array, Hash Table, String, Trie, Sorting, Heap (Priority Queue), Bucket Sort, Counting
1648Sell Diminishing-Valued Colored BallsMedium34Array, Math, Binary Search, Greedy, Sorting, Heap (Priority Queue)
502IPOHard34Array, Greedy, Sorting, Heap (Priority Queue)
451Sort Characters By FrequencyMedium21Hash Table, String, Sorting, Heap (Priority Queue), Bucket Sort, Counting
1642Furthest Building You Can ReachMedium21Array, Greedy, Heap (Priority Queue)
871Minimum Number of Refueling StopsHard21Array, Dynamic Programming, Greedy, Heap (Priority Queue)
973K Closest Points to OriginMedium21Array, Math, Divide and Conquer, Geometry, Sorting, Heap (Priority Queue), Quickselect, K-D Tree
378Kth Smallest Element in a Sorted MatrixMedium21Array, Binary Search, Sorting, Heap (Priority Queue), Matrix
480Sliding Window MedianHard21Array, Hash Table, Sliding Window, Heap (Priority Queue), Treap
1464Maximum Product of Two Elements in an ArrayEasy21Array, Sorting, Heap (Priority Queue)
1353Maximum Number of Events That Can Be AttendedMedium14Array, Greedy, Sorting, Heap (Priority Queue)
2593Find Score of an Array After Marking All ElementsMedium14Array, Hash Table, Sorting, Heap (Priority Queue), Simulation
3296Minimum Number of Seconds to Make Mountain Height ZeroMedium14Array, Math, Binary Search, Greedy, Heap (Priority Queue)
3462Maximum Sum With at Most K ElementsMedium14Array, Greedy, Sorting, Heap (Priority Queue), Matrix
703Kth Largest Element in a StreamEasy14Tree, Design, Binary Search Tree, Heap (Priority Queue), Binary Tree, Data Stream
2974Minimum Number GameEasy14Array, Sorting, Heap (Priority Queue), Simulation
857Minimum Cost to Hire K WorkersHard14Array, Greedy, Sorting, Heap (Priority Queue)
1834Single-Threaded CPUMedium14Array, Sorting, Heap (Priority Queue)
2357Make Array Zero by Subtracting Equal AmountsEasy14Array, Hash Table, Greedy, Sorting, Heap (Priority Queue), Simulation

08 · Overlapping Intervals 14

14 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
56Merge IntervalsMedium72Array, Sorting, Quicksort
253Meeting Rooms II PremiumMedium56Array, Two Pointers, Greedy, Sorting, Heap (Priority Queue), Prefix Sum
435Non-overlapping IntervalsMedium43Array, Dynamic Programming, Greedy, Sorting
57Insert IntervalMedium36Array
228Summary RangesEasy30Array
1288Remove Covered IntervalsMedium30Array, Sorting
252Meeting Rooms PremiumEasy26Array, Sorting, Quicksort
986Interval List IntersectionsMedium21Array, Two Pointers, Sweep Line
763Partition LabelsMedium14Hash Table, Two Pointers, String, Greedy
729My Calendar IMedium14Array, Binary Search, Design, Segment Tree, Ordered Set
1094Car PoolingMedium14Array, Sorting, Heap (Priority Queue), Simulation, Prefix Sum
452Minimum Number of Arrows to Burst BalloonsMedium14Array, Greedy, Sorting
759Employee Free Time PremiumHard14Array, Sweep Line, Sorting, Heap (Priority Queue)
436Find Right IntervalMedium14Array, Binary Search, Sorting

09 · Modified Binary Search 41

32 solved on the pattern page (step-by-step explanation and a step-through player), 9 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
875Koko Eating BananasMedium71Array, Binary Search
33Search in Rotated Sorted ArrayMedium70Array, Binary Search
34Find First and Last Position of Element in Sorted ArrayMedium58Array, Binary Search
1011Capacity To Ship Packages Within D DaysMedium58Array, Binary Search
35Search Insert PositionEasy54Array, Binary Search
410Split Array Largest SumHard54Array, Binary Search, Dynamic Programming, Greedy, Prefix Sum
540Single Element in a Sorted ArrayMedium50Array, Binary Search
162Find Peak ElementMedium48Array, Binary Search
69Sqrt(x)Easy48Math, Binary Search, Newton's Method
349Intersection of Two ArraysEasy48Array, Hash Table, Two Pointers, Binary Search, Sorting
240Search a 2D Matrix IIMedium47Array, Binary Search, Divide and Conquer, Matrix
981Time Based Key-Value StoreMedium45Hash Table, String, Binary Search, Design
153Find Minimum in Rotated Sorted ArrayMedium45Array, Binary Search
74Search a 2D MatrixMedium43Array, Binary Search, Matrix
1482Minimum Number of Days to Make m BouquetsMedium43Array, Binary Search
704Binary SearchEasy43Array, Binary Search
1539Kth Missing Positive NumberEasy41Array, Binary Search
278First Bad VersionEasy41Binary Search, Interactive
852Peak Index in a Mountain ArrayMedium39Array, Binary Search, Ternary Search
81Search in Rotated Sorted Array IIMedium36Array, Binary Search
268Missing NumberEasy30Array, Hash Table, Math, Binary Search, Bit Manipulation, Sorting
1283Find the Smallest Divisor Given a ThresholdMedium30Array, Binary Search
1552Magnetic Force Between Two BallsMedium30Array, Binary Search, Sorting
3633Earliest Finish Time for Land and Water Rides IEasy30Array, Two Pointers, Binary Search, Greedy, Sorting
1235Maximum Profit in Job SchedulingHard26Array, Binary Search, Dynamic Programming, Sorting
350Intersection of Two Arrays IIEasy26Array, Hash Table, Two Pointers, Binary Search, Sorting
3488Closest Equal Element QueriesMedium26Array, Hash Table, Binary Search
3920Maximize Fixed Points After DeletionsHard26Array, Binary Search, Sorting
374Guess Number Higher or LowerEasy26Binary Search, Interactive
354Russian Doll EnvelopesHard21Array, Binary Search, Dynamic Programming, Sorting, Longest Increasing Subsequence
1901Find a Peak Element IIMedium21Array, Binary Search, Matrix
2448Minimum Cost to Make Array EqualHard21Array, Binary Search, Greedy, Sorting, Prefix Sum
1146Snapshot ArrayMedium14Array, Hash Table, Binary Search, Design, Persistent Data Structure
3661Maximum Walls Destroyed by RobotsHard14Array, Binary Search, Dynamic Programming, Sorting
2226Maximum Candies Allocated to K ChildrenMedium14Array, Binary Search
2064Minimized Maximum of Products Distributed to Any StoreMedium14Array, Binary Search, Greedy
367Valid Perfect SquareEasy14Math, Binary Search
888Fair Candy SwapEasy14Array, Hash Table, Binary Search, Sorting
2080Range Frequency QueriesMedium14Array, Hash Table, Binary Search, Design, Segment Tree
2035Partition Array Into Two Arrays to Minimize Sum DifferenceHard14Array, Two Pointers, Binary Search, Dynamic Programming, Bit Manipulation, Meet in the Middle, Sorting, Ordered Set, Bitmask
1346Check If N and Its Double ExistEasy14Array, Hash Table, Two Pointers, Binary Search, Sorting

10 · Binary Tree Traversal 43

41 solved on the pattern page (step-by-step explanation and a step-through player), 2 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
236Lowest Common Ancestor of a Binary TreeMedium65Tree, Depth-First Search, Binary Tree, Binary Lifting, Lowest Common Ancestor
100Same TreeEasy48Tree, Depth-First Search, Breadth-First Search, Binary Tree
124Binary Tree Maximum Path SumHard48Dynamic Programming, Tree, Depth-First Search, Binary Tree, DP on Trees
199Binary Tree Right Side ViewMedium48Tree, Depth-First Search, Breadth-First Search, Binary Tree
543Diameter of Binary TreeEasy48Tree, Depth-First Search, Binary Tree, DP on Trees
94Binary Tree Inorder TraversalEasy45Stack, Tree, Depth-First Search, Binary Tree
103Binary Tree Zigzag Level Order TraversalMedium39Tree, Breadth-First Search, Binary Tree
297Serialize and Deserialize Binary TreeHard39String, Tree, Depth-First Search, Breadth-First Search, Design, Binary Tree
987Vertical Order Traversal of a Binary TreeHard39Hash Table, Tree, Depth-First Search, Breadth-First Search, Sorting, Binary Tree
337House Robber IIIMedium39Dynamic Programming, Tree, Depth-First Search, Binary Tree, DP on Trees
110Balanced Binary TreeEasy39Tree, Depth-First Search, Binary Tree
98Validate Binary Search TreeMedium36Tree, Depth-First Search, Binary Search Tree, Binary Tree
101Symmetric TreeEasy36Tree, Depth-First Search, Breadth-First Search, Binary Tree
99Recover Binary Search TreeMedium36Tree, Depth-First Search, Binary Search Tree, Binary Tree
2385Amount of Time for Binary Tree to Be InfectedMedium36Hash Table, Tree, Depth-First Search, Breadth-First Search, Binary Tree
104Maximum Depth of Binary TreeEasy34Tree, Depth-First Search, Breadth-First Search, Binary Tree
102Binary Tree Level Order TraversalMedium34Tree, Breadth-First Search, Binary Tree
662Maximum Width of Binary TreeMedium34Tree, Depth-First Search, Breadth-First Search, Binary Tree
2196Create Binary Tree From DescriptionsMedium34Array, Hash Table, Tree, Binary Tree
105Construct Binary Tree from Preorder and Inorder TraversalMedium30Array, Hash Table, Divide and Conquer, Tree, Binary Tree
235Lowest Common Ancestor of a Binary Search TreeMedium30Tree, Depth-First Search, Binary Search Tree, Binary Tree, Binary Lifting, Lowest Common Ancestor
113Path Sum IIMedium30Backtracking, Tree, Depth-First Search, Binary Tree
144Binary Tree Preorder TraversalEasy30Stack, Tree, Depth-First Search, Binary Tree
968Binary Tree CamerasHard26Dynamic Programming, Tree, Depth-First Search, Binary Tree, DP on Trees
116Populating Next Right Pointers in Each NodeMedium26Linked List, Tree, Depth-First Search, Breadth-First Search, Binary Tree
108Convert Sorted Array to Binary Search TreeEasy26Array, Divide and Conquer, Tree, Binary Search Tree, Binary Tree
1038Binary Search Tree to Greater Sum TreeMedium26Tree, Depth-First Search, Binary Search Tree, Binary Tree
1650Lowest Common Ancestor of a Binary Tree III PremiumMedium21Hash Table, Two Pointers, Tree, Binary Tree, Binary Lifting, Lowest Common Ancestor
2583Kth Largest Sum in a Binary TreeMedium21Tree, Breadth-First Search, Sorting, Binary Tree
1028Recover a Tree From Preorder TraversalHard21String, Tree, Depth-First Search, Binary Tree
572Subtree of Another TreeEasy21Tree, Depth-First Search, String Matching, Binary Tree, Hash Function
701Insert into a Binary Search TreeMedium21Tree, Binary Search Tree, Binary Tree
3558Number of Ways to Assign Edge Weights IMedium21Math, Tree, Depth-First Search
230Kth Smallest Element in a BSTMedium21Tree, Depth-First Search, Binary Search Tree, Binary Tree
114Flatten Binary Tree to Linked ListMedium14Linked List, Stack, Tree, Depth-First Search, Binary Tree
988Smallest String Starting From LeafMedium14String, Backtracking, Tree, Depth-First Search, Binary Tree
222Count Complete Tree NodesMedium14Binary Search, Bit Manipulation, Tree, Binary Tree
938Range Sum of BSTEasy14Tree, Depth-First Search, Binary Search Tree, Binary Tree
1932Merge BSTs to Create Single BSTHard14Array, Hash Table, Tree, Depth-First Search, Binary Search Tree, Binary Tree
979Distribute Coins in Binary TreeMedium14Tree, Depth-First Search, Binary Tree, DP on Trees
1373Maximum Sum BST in Binary TreeHard14Dynamic Programming, Tree, Depth-First Search, Binary Search Tree, Binary Tree, DP on Trees
1315Sum of Nodes with Even-Valued GrandparentMedium14Tree, Depth-First Search, Breadth-First Search, Binary Tree
450Delete Node in a BSTMedium14Tree, Binary Search Tree, Binary Tree

11 · Depth-First Search (DFS) on Graphs 19

19 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
207Course ScheduleMedium72Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort, Directed Acyclic Graph
210Course Schedule IIMedium52Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort
547Number of ProvincesMedium39Depth-First Search, Breadth-First Search, Union-Find, Graph Theory
399Evaluate DivisionMedium34Array, String, Depth-First Search, Breadth-First Search, Union-Find, Graph Theory, Shortest Path, Bellman–Ford Algorithm, Floyd–Warshall Algorithm
1971Find if Path Exists in GraphEasy34Depth-First Search, Breadth-First Search, Union-Find, Graph Theory
2050Parallel Courses IIIHard30Array, Dynamic Programming, Graph Theory, Topological Sort, Directed Acyclic Graph
133Clone GraphMedium26Hash Table, Depth-First Search, Breadth-First Search, Graph Theory
1192Critical Connections in a NetworkHard26Depth-First Search, Graph Theory, Biconnected Component, Bridge (Graph)
269Alien Dictionary PremiumHard26Array, String, Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort, Directed Acyclic Graph
785Is Graph Bipartite?Medium26Depth-First Search, Breadth-First Search, Union-Find, Graph Theory, Graph Coloring, Bipartite Graph
802Find Eventual Safe StatesMedium21Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort, Kosaraju's Algorithm, Tarjan's SCC Algorithm
797All Paths From Source to TargetMedium21Backtracking, Depth-First Search, Breadth-First Search, Graph Theory, Directed Acyclic Graph
3310Remove Methods From ProjectMedium21Depth-First Search, Breadth-First Search, Graph Theory
886Possible BipartitionMedium14Depth-First Search, Breadth-First Search, Union-Find, Graph Theory, Graph Coloring, Bipartite Graph
1376Time Needed to Inform All EmployeesMedium14Tree, Depth-First Search, Breadth-First Search
1306Jump Game IIIMedium14Array, Depth-First Search, Breadth-First Search
2477Minimum Fuel Cost to Report to the CapitalMedium14Tree, Depth-First Search, Breadth-First Search, Graph Theory
2115Find All Possible Recipes from Given SuppliesMedium14Array, Hash Table, String, Graph Theory, Topological Sort, Directed Acyclic Graph
386Lexicographical NumbersMedium14Depth-First Search, Trie

12 · Breadth-First Search (BFS) 21

21 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
994Rotting OrangesMedium71Array, Breadth-First Search, Matrix
127Word LadderHard52Hash Table, String, Breadth-First Search, Bidirectional Search
863All Nodes Distance K in Binary TreeMedium47Hash Table, Tree, Depth-First Search, Breadth-First Search, Binary Tree
752Open the LockMedium36Array, Hash Table, String, Breadth-First Search, Bidirectional Search
54201 MatrixMedium34Array, Dynamic Programming, Breadth-First Search, Matrix
815Bus RoutesHard30Array, Hash Table, Breadth-First Search
1091Shortest Path in Binary MatrixMedium26Array, Breadth-First Search, Matrix
1236Web Crawler PremiumMedium26String, Depth-First Search, Breadth-First Search, Interactive
126Word Ladder IIHard21Hash Table, String, Backtracking, Breadth-First Search, Bidirectional Search
1293Shortest Path in a Grid with Obstacles EliminationHard21Array, Breadth-First Search, Matrix
3629Minimum Jumps to Reach End via Prime TeleportationMedium21Array, Hash Table, Math, Breadth-First Search, Number Theory
310Minimum Height TreesMedium21Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort
111Minimum Depth of Binary TreeEasy14Tree, Depth-First Search, Breadth-First Search, Binary Tree
286Walls and Gates PremiumMedium14Array, Breadth-First Search, Matrix
854K-Similar StringsHard14Hash Table, String, Breadth-First Search
1345Jump Game IVHard14Array, Hash Table, Breadth-First Search
433Minimum Genetic MutationMedium14Hash Table, String, Breadth-First Search, Bidirectional Search
3552Grid Teleportation TraversalMedium14Array, Hash Table, Breadth-First Search, Matrix
1311Get Watched Videos by Your FriendsMedium14Array, Hash Table, Breadth-First Search, Graph Theory, Sorting
117Populating Next Right Pointers in Each Node IIMedium14Linked List, Tree, Depth-First Search, Breadth-First Search, Binary Tree
1162As Far from Land as PossibleMedium14Array, Dynamic Programming, Breadth-First Search, Matrix

13 · Matrix Traversal 26

18 solved on the pattern page (step-by-step explanation and a step-through player), 8 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
200Number of IslandsMedium76Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix
48Rotate ImageMedium58Array, Math, Matrix
54Spiral MatrixMedium51Array, Matrix, Simulation
73Set Matrix ZeroesMedium47Array, Hash Table, Matrix
130Surrounded RegionsMedium39Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix
417Pacific Atlantic Water FlowMedium36Array, Depth-First Search, Breadth-First Search, Matrix
2965Find Missing and Repeated ValuesEasy36Array, Hash Table, Math, Matrix
1559Detect Cycles in 2D GridMedium30Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix
733Flood FillEasy26Array, Depth-First Search, Breadth-First Search, Matrix
59Spiral Matrix IIMedium26Array, Matrix, Simulation
695Max Area of IslandMedium26Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix
2661First Completely Painted Row or ColumnMedium26Array, Hash Table, Matrix
2643Row With Maximum OnesEasy26Array, Matrix
874Walking Robot SimulationMedium21Array, Hash Table, Simulation
566Reshape the MatrixEasy21Array, Matrix, Simulation
1572Matrix Diagonal SumEasy14Array, Matrix
2946Matrix Similarity After Cyclic ShiftsEasy14Array, Math, Matrix, Simulation
1886Determine Whether Matrix Can Be Obtained By RotationEasy14Array, Matrix
2033Minimum Operations to Make a Uni-Value GridMedium14Array, Math, Sorting, Matrix
861Score After Flipping MatrixMedium14Array, Greedy, Bit Manipulation, Matrix
3459Length of Longest V-Shaped Diagonal SegmentHard14Array, Dynamic Programming, Memoization, Matrix
1536Minimum Swaps to Arrange a Binary GridMedium14Array, Greedy, Matrix
1672Richest Customer WealthEasy14Array, Matrix
1582Special Positions in a Binary MatrixEasy14Array, Matrix
289Game of LifeMedium14Array, Matrix, Simulation
778Swim in Rising WaterHard14Array, Binary Search, Depth-First Search, Breadth-First Search, Union-Find, Minimax, Heap (Priority Queue), Matrix, Dijkstra's Algorithm

14 · Backtracking 24

22 solved on the pattern page (step-by-step explanation and a step-through player), 2 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
17Letter Combinations of a Phone NumberMedium64Hash Table, String, Backtracking
78SubsetsMedium63Array, Backtracking, Bit Manipulation
22Generate ParenthesesMedium55String, Dynamic Programming, Backtracking, Bracket Sequences
46PermutationsMedium55Array, Backtracking
79Word SearchMedium50Array, String, Backtracking, Depth-First Search, Matrix
51N-QueensHard45Array, Backtracking, Algorithm X
90Subsets IIMedium41Array, Backtracking, Bit Manipulation
131Palindrome PartitioningMedium39String, Dynamic Programming, Backtracking
212Word Search IIHard39Array, String, Backtracking, Trie, Matrix
39Combination SumMedium30Array, Backtracking
77CombinationsMedium30Backtracking
1291Sequential DigitsMedium30Enumeration
37Sudoku SolverHard26Array, Hash Table, Backtracking, Matrix, Algorithm X, Dancing Links
140Word Break IIHard26Array, Hash Table, String, Dynamic Programming, Backtracking, Trie, Memoization
40Combination Sum IIMedium26Array, Backtracking
47Permutations IIMedium26Array, Backtracking, Sorting
60Permutation SequenceHard21Math, Recursion
698Partition to K Equal Sum SubsetsMedium21Array, Dynamic Programming, Backtracking, Bit Manipulation, Memoization, Bitmask
93Restore IP AddressesMedium21String, Backtracking
1980Find Unique Binary StringMedium21Array, Hash Table, String, Backtracking
89Gray CodeMedium14Math, Backtracking, Bit Manipulation
301Remove Invalid ParenthesesHard14String, Backtracking, Breadth-First Search
401Binary WatchEasy14Backtracking, Bit Manipulation
257Binary Tree PathsEasy14String, Backtracking, Tree, Depth-First Search, Binary Tree

15 · Dynamic Programming Patterns 86

82 solved on the pattern page (step-by-step explanation and a step-through player), 4 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
53Maximum SubarrayMedium63Array, Divide and Conquer, Dynamic Programming
198House RobberMedium63Array, Dynamic Programming
70Climbing StairsEasy61Math, Dynamic Programming, Memoization
62Unique PathsMedium55Math, Dynamic Programming, Combinatorics
322Coin ChangeMedium55Array, Dynamic Programming, Breadth-First Search, Knapsack Problem, Complete Knapsack
152Maximum Product SubarrayMedium48Array, Dynamic Programming
416Partition Equal Subset SumMedium48Array, Dynamic Programming, Knapsack Problem, 0-1 Knapsack
118Pascal's TriangleEasy45Array, Dynamic Programming
139Word BreakMedium45Array, Hash Table, String, Dynamic Programming, Trie, Memoization, Brute-Force Search
97Interleaving StringMedium43String, Dynamic Programming
32Longest Valid ParenthesesHard41String, Dynamic Programming, Stack, Bracket Sequences
300Longest Increasing SubsequenceMedium41Array, Binary Search, Dynamic Programming, Longest Increasing Subsequence
72Edit DistanceMedium41String, Dynamic Programming
10Regular Expression MatchingHard39String, Dynamic Programming, Recursion
509Fibonacci NumberEasy39Math, Dynamic Programming, Recursion, Memoization
63Unique Paths IIMedium39Array, Dynamic Programming, Matrix
472Concatenated WordsHard39Array, String, Dynamic Programming, Depth-First Search, Trie, Sorting
44Wildcard MatchingHard39String, Dynamic Programming, Greedy, Recursion
1143Longest Common SubsequenceMedium36String, Dynamic Programming, Longest Common Subsequence
312Burst BalloonsHard36Array, Dynamic Programming
918Maximum Sum Circular SubarrayMedium34Array, Divide and Conquer, Dynamic Programming, Queue, Monotonic Queue
486Predict the WinnerMedium34Array, Math, Dynamic Programming, Recursion, Minimax, Game Theory, Zero-Sum Game
64Minimum Path SumMedium30Array, Dynamic Programming, Matrix
213House Robber IIMedium30Array, Dynamic Programming
518Coin Change IIMedium30Array, Dynamic Programming, Knapsack Problem, Complete Knapsack
396Rotate FunctionMedium30Array, Math, Dynamic Programming
3751Total Waviness of Numbers in Range IMedium30Math, Dynamic Programming, Enumeration
1140Stone Game IIMedium30Array, Math, Dynamic Programming, Minimax, Prefix Sum, Game Theory, Zero-Sum Game
746Min Cost Climbing StairsEasy26Array, Dynamic Programming
174Dungeon GameHard26Array, Dynamic Programming, Matrix
403Frog JumpHard26Array, Dynamic Programming
983Minimum Cost For TicketsMedium26Array, Dynamic Programming
1871Jump Game VIIMedium26String, Dynamic Programming, Sliding Window, Prefix Sum
123Best Time to Buy and Sell Stock IIIHard26Array, Dynamic Programming
494Target SumMedium26Array, Dynamic Programming, Backtracking, Knapsack Problem, 0-1 Knapsack
120TriangleMedium21Array, Dynamic Programming
279Perfect SquaresMedium21Math, Dynamic Programming, Breadth-First Search, Knapsack Problem, Complete Knapsack
790Domino and Tromino TilingMedium21Dynamic Programming
1547Minimum Cost to Cut a StickHard21Array, Dynamic Programming, Sorting
3225Maximum Score From Grid OperationsHard21Array, Dynamic Programming, Matrix, Prefix Sum
2770Maximum Number of Jumps to Reach the Last IndexMedium21Array, Dynamic Programming
1691Maximum Height by Stacking Cuboids Hard21Array, Dynamic Programming, Sorting
2272Substring With Largest VarianceHard21Hash Table, String, Dynamic Programming, Enumeration
3753Total Waviness of Numbers in Range IIHard21Math, Dynamic Programming
132Palindrome Partitioning IIHard21String, Dynamic Programming
1478Allocate MailboxesHard21Array, Math, Dynamic Programming, Sorting
1000Minimum Cost to Merge StonesHard21Array, Dynamic Programming, Prefix Sum
741Cherry PickupHard21Array, Dynamic Programming, Matrix
115Distinct SubsequencesHard21String, Dynamic Programming
188Best Time to Buy and Sell Stock IVHard21Array, Dynamic Programming
474Ones and ZeroesMedium21Array, String, Dynamic Programming, Knapsack Problem, 0-1 Knapsack
1406Stone Game IIIHard21Array, Math, Dynamic Programming, Minimax, Game Theory, Zero-Sum Game
1335Minimum Difficulty of a Job ScheduleHard21Array, Dynamic Programming
647Palindromic SubstringsMedium14Two Pointers, String, Dynamic Programming
3434Maximum Frequency After Subarray OperationMedium14Array, Hash Table, Dynamic Programming, Greedy, Enumeration, Prefix Sum
1277Count Square Submatrices with All OnesMedium14Array, Dynamic Programming, Matrix
931Minimum Falling Path SumMedium14Array, Dynamic Programming, Matrix
3130Find All Possible Stable Binary Arrays IIHard14Dynamic Programming, Prefix Sum
1594Maximum Non Negative Product in a MatrixMedium14Array, Dynamic Programming, Matrix
338Counting BitsEasy14Dynamic Programming, Bit Manipulation
3418Maximum Amount of Money Robot Can EarnMedium14Array, Dynamic Programming, Matrix
3857Minimum Cost to Split into OnesMedium14Math, Dynamic Programming
313Super Ugly NumberMedium14Array, Math, Dynamic Programming
3660Jump Game IXMedium14Array, Dynamic Programming
788Rotated DigitsMedium14Math, Dynamic Programming
516Longest Palindromic SubsequenceMedium14String, Dynamic Programming
1494Parallel Courses IIHard14Dynamic Programming, Bit Manipulation, Graph Theory, Bitmask, Directed Acyclic Graph
1340Jump Game VHard14Array, Dynamic Programming, Sorting
2262Total Appeal of A StringHard14Hash Table, String, Dynamic Programming
1463Cherry Pickup IIHard14Array, Dynamic Programming, Matrix
740Delete and EarnMedium14Array, Hash Table, Dynamic Programming
1137N-th Tribonacci NumberEasy14Math, Dynamic Programming, Memoization
376Wiggle SubsequenceMedium14Array, Dynamic Programming, Greedy
673Number of Longest Increasing SubsequenceMedium14Array, Dynamic Programming, Binary Indexed Tree, Segment Tree, Longest Increasing Subsequence
1014Best Sightseeing PairMedium14Array, Dynamic Programming
3336Find the Number of Subsequences With Equal GCDHard14Array, Math, Dynamic Programming, Number Theory, Euclidean Algorithm, Greatest Common Divisor
2742Painting the WallsHard14Array, Dynamic Programming
241Different Ways to Add ParenthesesMedium14Math, String, Dynamic Programming, Recursion, Memoization, Bracket Sequences
368Largest Divisible SubsetMedium14Array, Math, Dynamic Programming, Sorting
3995Minimum Cost to Convert String IIIHard14
1025Divisor GameEasy14Math, Dynamic Programming, Brainteaser, Game Theory, Impartial Game
689Maximum Sum of 3 Non-Overlapping SubarraysHard14Array, Dynamic Programming, Sliding Window, Prefix Sum
309Best Time to Buy and Sell Stock with CooldownMedium14Array, Dynamic Programming
805Split Array With Same AverageHard14Array, Hash Table, Math, Dynamic Programming, Bit Manipulation, Meet in the Middle, Bitmask
940Distinct Subsequences IIHard14String, Dynamic Programming
377Combination Sum IVMedium14Array, Dynamic Programming

16 · Hash Map & Set 38

27 solved on the pattern page (step-by-step explanation and a step-through player), 11 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
1Two SumEasy100Array, Hash Table
49Group AnagramsMedium75Array, Hash Table, String, Sorting
128Longest Consecutive SequenceMedium68Array, Hash Table, Union-Find
169Majority ElementEasy66Array, Hash Table, Divide and Conquer, Sorting, Counting, Boyer–Moore Majority Vote Algorithm
217Contains DuplicateEasy57Array, Hash Table, Sorting
242Valid AnagramEasy52Hash Table, String, Sorting
387First Unique Character in a StringEasy48Hash Table, String, Queue, Counting
36Valid SudokuMedium45Array, Hash Table, Matrix
205Isomorphic StringsEasy45Hash Table, String
383Ransom NoteEasy41Hash Table, String, Counting
3872Longest Arithmetic Sequence After Changing At Most One ElementMedium39Array, Enumeration
1002Find Common CharactersEasy36Array, Hash Table, String
229Majority Element IIMedium34Array, Hash Table, Sorting, Counting, Boyer–Moore Majority Vote Algorithm
299Bulls and CowsMedium30Hash Table, String, Counting
554Brick WallMedium26Array, Hash Table
2657Find the Prefix Common Array of Two ArraysMedium26Array, Hash Table, Bit Manipulation
1152Analyze User Website Visit Pattern PremiumMedium21Array, Hash Table, String, Sorting
2910Minimum Number of Groups to Create a Valid AssignmentMedium21Array, Hash Table, Greedy
149Max Points on a LineHard21Array, Hash Table, Math, Geometry, Euclidean Algorithm, Greatest Common Divisor
290Word PatternEasy21Hash Table, String
3120Count the Number of Special Characters IEasy21Hash Table, String
859Buddy StringsEasy21Hash Table, String
771Jewels and StonesEasy21Hash Table, String
1189Maximum Number of BalloonsEasy21Hash Table, String, Counting
3020Find the Maximum Number of Elements in SubsetMedium21Array, Hash Table, Enumeration
2840Check if Strings Can be Made Equal With Operations IIMedium14Hash Table, String, Sorting
3761Minimum Absolute Distance Between Mirror PairsMedium14Array, Hash Table, Math
1207Unique Number of OccurrencesEasy14Array, Hash Table
3005Count Elements With Maximum FrequencyEasy14Array, Hash Table, Counting
1832Check if the Sentence Is PangramEasy14Hash Table, String
953Verifying an Alien DictionaryEasy14Array, Hash Table, String
3927Minimize Array Sum Using Divisible ReplacementsMedium14Array, Hash Table, Math, Greedy, Number Theory
929Unique Email AddressesEasy14Array, Hash Table, String
448Find All Numbers Disappeared in an ArrayEasy14Array, Hash Table
1781Sum of Beauty of All SubstringsMedium14Hash Table, String, Counting
2399Check Distances Between Same LettersEasy14Array, Hash Table, String
3016Minimum Number of Pushes to Type Word IIMedium14Hash Table, String, Greedy, Sorting, Counting
4007Widest Possible FenceMedium14

17 · Stack 22

16 solved on the pattern page (step-by-step explanation and a step-through player), 6 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
20Valid ParenthesesEasy61String, Stack, Bracket Sequences
735Asteroid CollisionMedium57Array, Stack, Simulation
155Min StackMedium47Stack, Design
394Decode StringMedium45String, Stack, Recursion
224Basic CalculatorHard36Math, String, Stack, Recursion
678Valid Parenthesis StringMedium36String, Dynamic Programming, Stack, Greedy, Bracket Sequences
1021Remove Outermost ParenthesesEasy36String, Stack, Bracket Sequences
622Design Circular QueueMedium34Array, Linked List, Design, Queue
150Evaluate Reverse Polish NotationMedium30Array, Math, Stack
232Implement Queue using StacksEasy26Stack, Design, Queue
1209Remove All Adjacent Duplicates in String IIMedium26String, Stack
1700Number of Students Unable to Eat LunchEasy26Array, Stack, Queue, Simulation
1614Maximum Nesting Depth of the ParenthesesEasy26String, Stack, Bracket Sequences
3614Process String with Special Operations IIHard26String, Simulation
71Simplify PathMedium14String, Stack
227Basic Calculator IIMedium14Math, String, Stack
1047Remove All Adjacent Duplicates In StringEasy14String, Stack
726Number of AtomsHard14Hash Table, String, Stack, Sorting
2751Robot CollisionsHard14Array, Stack, Sorting, Simulation
3612Process String with Special Operations IMedium14String, Simulation
225Implement Stack using QueuesEasy14Stack, Design, Queue
1910Remove All Occurrences of a SubstringMedium14String, Stack, Simulation

18 · Greedy 41

28 solved on the pattern page (step-by-step explanation and a step-through player), 13 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
55Jump GameMedium58Array, Dynamic Programming, Greedy
3914Minimum Operations to Make Array Non DecreasingMedium52Array, Greedy
179Largest NumberMedium45Array, String, Greedy, Sorting
45Jump Game IIMedium41Array, Dynamic Programming, Greedy
122Best Time to Buy and Sell Stock IIMedium41Array, Dynamic Programming, Greedy
1833Maximum Ice Cream BarsMedium39Array, Greedy, Sorting, Counting Sort
134Gas StationMedium36Array, Greedy
1665Minimum Initial Energy to Finish TasksHard34Array, Greedy, Sorting
605Can Place FlowersEasy30Array, Greedy
3635Earliest Finish Time for Land and Water Rides IIMedium30Array, Two Pointers, Binary Search, Greedy, Sorting
1326Minimum Number of Taps to Open to Water a GardenHard30Array, Dynamic Programming, Greedy
135CandyHard26Array, Greedy
2384Largest Palindromic NumberMedium26Hash Table, String, Greedy, Counting
1331Rank Transform of an ArrayEasy26Array, Hash Table, Sorting
3499Maximize Active Section with Trade IMedium26String, Enumeration
561Array PartitionEasy21Array, Greedy, Sorting, Counting Sort
274H-IndexMedium21Array, Sorting, Counting Sort
1727Largest Submatrix With RearrangementsMedium21Array, Greedy, Sorting, Matrix
1029Two City SchedulingMedium21Array, Greedy, Sorting, Hungarian Algorithm, Successive Shortest Path Algorithm
2144Minimum Cost of Buying Candies With DiscountEasy21Array, Greedy, Sorting
3948Lexicographically Maximum MEX ArrayHard21Array, Hash Table, Greedy, Queue
414Third Maximum NumberEasy21Array, Sorting
164Maximum GapMedium21Array, Sorting, Bucket Sort, Radix Sort, Pigeonhole Principle
1846Maximum Element After Decreasing and RearrangingMedium21Array, Greedy, Sorting
1502Can Make Arithmetic Progression From SequenceEasy21Array, Sorting
2996Smallest Missing Integer Greater Than Sequential Prefix SumEasy21Array, Hash Table, Sorting
860Lemonade ChangeEasy14Array, Greedy
2273Find Resultant Array After Removing AnagramsEasy14Array, Hash Table, String, Sorting
1689Partitioning Into Minimum Number Of Deci-Binary NumbersMedium14String, Greedy
2078Two Furthest Houses With Different ColorsEasy14Array, Greedy
2418Sort the PeopleEasy14Array, Hash Table, String, Sorting
3689Maximum Total Subarray Value IMedium14Array, Greedy
2405Optimal Partition of StringMedium14Hash Table, String, Greedy
1200Minimum Absolute DifferenceEasy14Array, Sorting
334Increasing Triplet SubsequenceMedium14Array, Greedy, Longest Increasing Subsequence
2294Partition Array Such That Maximum Difference Is KMedium14Array, Greedy, Sorting
1221Split a String in Balanced StringsEasy14String, Greedy, Counting
912Sort an ArrayMedium14Array, Divide and Conquer, Sorting, Heap (Priority Queue), Merge Sort, Bucket Sort, Radix Sort, Counting Sort
846Hand of StraightsMedium14Array, Hash Table, Greedy, Sorting
517Super Washing MachinesHard14Array, Greedy
2607Make K-Subarray Sums EqualMedium14Array, Math, Greedy, Sorting, Number Theory

19 · Trie & Design 23

20 solved on the pattern page (step-by-step explanation and a step-through player), 3 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
146LRU CacheMedium80Hash Table, Linked List, Design, Doubly-Linked List
380Insert Delete GetRandom O(1)Medium41Array, Hash Table, Math, Design, Randomized
1429First Unique Number PremiumMedium36Array, Hash Table, Design, Queue, Data Stream
460LFU CacheHard30Hash Table, Linked List, Design, Doubly-Linked List
1268Search Suggestions SystemMedium30Array, String, Binary Search, Trie, Sorting, Heap (Priority Queue)
3043Find the Length of the Longest Common PrefixMedium30Array, Hash Table, String, Trie
933Number of Recent CallsEasy21Design, Queue, Data Stream
1472Design Browser HistoryMedium21Array, Linked List, Stack, Design, Doubly-Linked List, Data Stream
348Design Tic-Tac-Toe PremiumMedium21Array, Hash Table, Design, Matrix, Simulation
1622Fancy SequenceHard21Math, Design, Segment Tree, Number Theory, Fermat's Little Theorem
3408Design Task ManagerMedium21Hash Table, Design, Heap (Priority Queue), Ordered Set
341Flatten Nested List IteratorMedium21Stack, Tree, Depth-First Search, Design, Queue, Iterator
211Design Add and Search Words Data StructureMedium14String, Depth-First Search, Design, Trie
359Logger Rate Limiter PremiumEasy14Hash Table, Design, Data Stream
1603Design Parking SystemEasy14Design, Simulation, Counting
855Exam RoomMedium14Design, Heap (Priority Queue), Ordered Set
895Maximum Frequency StackHard14Hash Table, Stack, Design, Ordered Set
3093Longest Common Suffix QueriesHard14Array, String, Trie
1797Design Authentication ManagerMedium14Hash Table, Linked List, Design, Doubly-Linked List
588Design In-Memory File System PremiumHard14Hash Table, String, Design, Trie, Sorting
2013Detect SquaresMedium14Array, Hash Table, Design, Counting, Data Stream
421Maximum XOR of Two Numbers in an ArrayMedium14Array, Hash Table, Bit Manipulation, Trie
1233Remove Sub-Folders from the FilesystemMedium14Array, String, Depth-First Search, Trie

20 · Shortest Path & MST 6

6 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
787Cheapest Flights Within K StopsMedium34Dynamic Programming, Depth-First Search, Breadth-First Search, Graph Theory, Heap (Priority Queue), Shortest Path
1584Min Cost to Connect All PointsMedium26Array, Union-Find, Graph Theory, Minimum Spanning Tree, Prim's Algorithm, Kruskal's Algorithm, Borůvka's Algorithm
743Network Delay TimeMedium21Depth-First Search, Breadth-First Search, Graph Theory, Heap (Priority Queue), Shortest Path, Dijkstra's Algorithm
3620Network Recovery PathwaysHard21Array, Binary Search, Dynamic Programming, Graph Theory, Topological Sort, Heap (Priority Queue), Shortest Path
3928Minimum Cost to Buy Apples IIHard14Array, Graph Theory, Heap (Priority Queue), Shortest Path
1631Path With Minimum EffortMedium14Array, Binary Search, Depth-First Search, Breadth-First Search, Union-Find, Heap (Priority Queue), Matrix, Dijkstra's Algorithm

21 · Array & String Basics 57

17 solved on the pattern page (step-by-step explanation and a step-through player), 40 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
14Longest Common PrefixEasy64Array, String, Trie
1929Concatenation of ArrayEasy58Array, Simulation
28Find the Index of the First Occurrence in a StringEasy58Two Pointers, String, String Matching, Z Algorithm, Knuth–Morris–Pratt Algorithm, Boyer–Moore String-Search Algorithm
1752Check if Array Is Sorted and RotatedEasy52Array
6Zigzag ConversionMedium51String
485Max Consecutive OnesEasy51Array
175Combine Two TablesEasy51Database
8String to Integer (atoi)Medium50String
796Rotate StringEasy50String, String Matching
13Roman to IntegerEasy47Hash Table, Math, String
1757Recyclable and Low Fat ProductsEasy43Database
12Integer to RomanMedium39Hash Table, Math, String
43Multiply StringsMedium39Math, String, Simulation
58Length of Last WordEasy36String
182Duplicate EmailsEasy36Database
1280Students and ExaminationsEasy36Database
197Rising TemperatureEasy34Database
1470Shuffle the ArrayEasy34Array
1184Distance Between Bus StopsEasy34Array
595Big CountriesEasy30Database
38Count and SayMedium30String
181Employees Earning More Than Their ManagersEasy30Database
1581Customer Who Visited but Did Not Make Any TransactionsEasy30Database
1848Minimum Distance to the Target ElementEasy30Array
1211Queries Quality and PercentageEasy30Database
1141User Activity for the Past 30 Days IEasy30Database
273Integer to English WordsHard26Math, String, Recursion
1661Average Time of Process per MachineEasy26Database
1392Longest Happy PrefixHard26String, Rolling Hash, String Matching, Hash Function, Z Algorithm, Knuth–Morris–Pratt Algorithm
1791Find Center of Star GraphEasy26Graph Theory
1920Build Array from PermutationEasy26Array, Simulation
2667Create Hello World FunctionEasy21
1148Article Views IEasy21Database
584Find Customer RefereeEasy21Database
2620CounterEasy21
610Triangle JudgementEasy21Database
2288Apply Discount to PricesMedium21String
3942Minimum Operations to Sort a PermutationMedium21Array
1068Product Sales Analysis IEasy21Database
586Customer Placing the Largest Number of OrdersEasy21Database
511Game Play Analysis IEasy21Database
151Reverse Words in a StringMedium14Two Pointers, String
183Customers Who Never OrderEasy14Database
1693Daily Leads and PartnersEasy14Database
2515Shortest Distance to Target String in a Circular ArrayEasy14Array, String
620Not Boring MoviesEasy14Database
657Robot Return to OriginEasy14String, Simulation
1050Actors and Directors Who Cooperated At Least Three TimesEasy14Database
1967Number of Strings That Appear as Substrings in WordEasy14Array, String
1075Project Employees IEasy14Database
1683Invalid TweetsEasy14Database
686Repeated String MatchMedium14String, String Matching, Z Algorithm, Knuth–Morris–Pratt Algorithm, Boyer–Moore String-Search Algorithm
3517Smallest Palindromic Rearrangement IMedium14String, Sorting, Counting Sort
1789Primary Department for Each EmployeeEasy14Database
1431Kids With the Greatest Number of CandiesEasy14Array
1041Robot Bounded In CircleMedium14Math, String, Simulation
1667Fix Names in a TableEasy14Database

22 · Math & Bit Manipulation 50

17 solved on the pattern page (step-by-step explanation and a step-through player), 33 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
9Palindrome NumberEasy71Math
7Reverse IntegerMedium57Math
136Single NumberEasy51Array, Bit Manipulation
67Add BinaryEasy48Math, String, Bit Manipulation, Simulation
1344Angle Between Hands of a ClockMedium45Math
50Pow(x, n)Medium41Math, Recursion
66Plus OneEasy39Array, Math
204Count PrimesMedium39Array, Math, Enumeration, Number Theory, Primality Test, Sieve Theory, Prime Number Sieve
258Add DigitsEasy39Math, Simulation, Number Theory
628Maximum Product of Three NumbersEasy39Array, Math, Sorting
231Power of TwoEasy36Math, Bit Manipulation, Recursion
1903Largest Odd Number in StringEasy36Math, String, Greedy
29Divide Two IntegersMedium34Math, Bit Manipulation
2235Add Two IntegersEasy30Math
645Set MismatchEasy30Array, Hash Table, Bit Manipulation, Sorting
190Reverse BitsEasy30Divide and Conquer, Bit Manipulation
168Excel Sheet Column TitleEasy26Math, String
137Single Number IIMedium26Array, Bit Manipulation
319Bulb SwitcherMedium26Math, Brainteaser
1512Number of Good PairsEasy26Array, Hash Table, Math, Counting
415Add StringsEasy26Math, String, Simulation
260Single Number IIIMedium26Array, Bit Manipulation
3312Sorted GCD Pair QueriesHard26Array, Hash Table, Math, Binary Search, Combinatorics, Counting, Number Theory, Prefix Sum, Euclidean Algorithm, Greatest Common Divisor
412Fizz BuzzEasy21Math, String, Simulation
371Sum of Two IntegersMedium21Math, Bit Manipulation
389Find the DifferenceEasy21Hash Table, String, Bit Manipulation, Sorting
1680Concatenation of Consecutive Binary NumbersMedium21Math, Bit Manipulation, Simulation
1823Find the Winner of the Circular GameMedium21Array, Math, Recursion, Queue, Simulation
3644Maximum K to Sort a PermutationMedium21Array, Bit Manipulation
1979Find Greatest Common Divisor of ArrayEasy21Array, Math, Number Theory, Euclidean Algorithm, Greatest Common Divisor
3014Minimum Number of Pushes to Type Word IEasy21Math, String, Greedy
1071Greatest Common Divisor of StringsEasy14Math, String, Euclidean Algorithm, Greatest Common Divisor
693Binary Number with Alternating BitsEasy14Bit Manipulation
868Binary GapEasy14Bit Manipulation
1228Missing Number In Arithmetic Progression PremiumEasy14Array, Math
318Maximum Product of Word LengthsMedium14Array, String, Bit Manipulation
171Excel Sheet Column NumberEasy14Math, String
728Self Dividing NumbersEasy14Math
1009Complement of Base 10 IntegerEasy14Bit Manipulation
1492The kth Factor of nMedium14Math, Number Theory, Prime Factorization
3304Find the K-th Character in String Game IEasy14Math, Bit Manipulation, Recursion, Simulation
507Perfect NumberEasy14Math
3754Concatenate Non-Zero Digits and Multiply by Sum IEasy14Math
3513Number of Unique XOR Triplets IMedium14Array, Math, Bit Manipulation
3514Number of Unique XOR Triplets IIMedium14Array, Math, Bit Manipulation, Enumeration
3536Maximum Product of Two DigitsEasy14Math, Sorting
2469Convert the TemperatureEasy14Math
2652Sum MultiplesEasy14Math
2520Count the Digits That Divide a NumberEasy14Math
191Number of 1 BitsEasy14Divide and Conquer, Bit Manipulation

23 · Union-Find (Disjoint Set Union) 8

8 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
721Accounts MergeMedium36Array, Hash Table, String, Depth-First Search, Breadth-First Search, Union-Find, Sorting
1319Number of Operations to Make Network ConnectedMedium34Depth-First Search, Breadth-First Search, Union-Find, Graph Theory
947Most Stones Removed with Same Row or ColumnMedium30Hash Table, Depth-First Search, Union-Find, Graph Theory, Bipartite Graph
990Satisfiability of Equality EquationsMedium21Array, String, Union-Find, Graph Theory
3532Path Existence Queries in a Graph IMedium21Array, Hash Table, Binary Search, Union-Find, Graph Theory
827Making A Large IslandHard14Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix
684Redundant ConnectionMedium14Depth-First Search, Breadth-First Search, Union-Find, Graph Theory
305Number of Islands II PremiumHard14Array, Hash Table, Union-Find

24 · Segment Tree & Fenwick Tree 5

5 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
493Reverse PairsHard39Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set, Treap
327Count of Range SumHard21Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set, Treap
3901Good Subsequence QueriesHard14Array, Math, Segment Tree, Number Theory
315Count of Smaller Numbers After SelfHard14Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set, Treap
2213Longest Substring of One Repeating CharacterHard14Array, String, Segment Tree, Ordered Set

SQL & JavaScript (practice on LeetCode) 16

Database and JavaScript problems from the list. They aren't Python algorithm problems, so they link straight to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
176Second Highest SalaryMedium45Database
570Managers with at Least 5 Direct ReportsMedium36Database
180Consecutive NumbersMedium30Database
1934Confirmation RateMedium26Database
1070Product Sales Analysis IIIMedium26Database
1164Product Price at a Given DateMedium26Database
1193Monthly Transactions IMedium26Database
185Department Top Three SalariesHard21Database
177Nth Highest SalaryMedium21Database
178Rank ScoresMedium21Database
1341Movie RatingMedium21Database
569Median Employee Salary PremiumHard14Database
550Game Play Analysis IVMedium14Database
184Department Highest SalaryMedium14Database
1204Last Person to Fit in the BusMedium14Database
1158Market Analysis IMedium14Database