InterviewKata
Interview preparation

Google interview problems, by pattern

All 785 problems from Google's six-month LeetCode list (252 Easy, 410 Medium, 123 Hard), grouped by the pattern that solves them. 572 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 Google 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 (33)
02 · Two Pointers (48)
03 · Sliding Window (32)
04 · Fast & Slow Pointers (13)
05 · LinkedList In-place Reversal (21)
21 · Array & String Basics (80)
227
Month 2Stacks, heaps, intervals, binary search06 · Monotonic Stack (18)
07 · Top 'K' Elements (24)
08 · Overlapping Intervals (12)
09 · Modified Binary Search (42)
17 · Stack (21)
117
Month 3Trees and graphs10 · Binary Tree Traversal (49)
11 · Depth-First Search (DFS) on Graphs (23)
12 · Breadth-First Search (BFS) (18)
13 · Matrix Traversal (23)
23 · Union-Find (Disjoint Set Union) (10)
123
Month 4Search and dynamic programming14 · Backtracking (23)
15 · Dynamic Programming Patterns (92)
115
Month 5Hashing, greedy, design, weighted graphs16 · Hash Map & Set (43)
18 · Greedy (39)
19 · Trie & Design (13)
20 · Shortest Path & MST (9)
104
Month 6Math, range structures, then mock interviews22 · Math & Bit Manipulation (72)
24 · Segment Tree & Fenwick Tree (11)
83

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 33

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

Done#ProblemLevelFrequencyTopicsLinks
560Subarray Sum Equals KMedium59Array, Hash Table, Prefix Sum
238Product of Array Except SelfMedium48Array, Prefix Sum
1480Running Sum of 1d ArrayEasy45Array, Prefix Sum
528Random Pick with WeightMedium37Array, Math, Binary Search, Prefix Sum, Randomized
1732Find the Highest AltitudeEasy33Array, Prefix Sum
974Subarray Sums Divisible by KMedium33Array, Hash Table, Prefix Sum
303Range Sum Query - ImmutableEasy33Array, Design, Prefix Sum
437Path Sum IIIMedium28Tree, Depth-First Search, Binary Tree
3026Maximum Good Subarray SumMedium28Array, Hash Table, Prefix Sum
2574Left and Right Sum DifferencesEasy28Array, Prefix Sum
3699Number of ZigZag Arrays IHard28Dynamic Programming, Prefix Sum
1109Corporate Flight BookingsMedium25Array, Prefix Sum
3737Count Subarrays With Majority Element IMedium25Array, Hash Table, Divide and Conquer, Segment Tree, Merge Sort, Counting, Prefix Sum
525Contiguous ArrayMedium22Array, Hash Table, Prefix Sum
304Range Sum Query 2D - ImmutableMedium22Array, Design, Matrix, Prefix Sum
3129Find All Possible Stable Binary Arrays IMedium17Dynamic Programming, Prefix Sum
862Shortest Subarray with Sum at Least KHard17Array, Binary Search, Queue, Sliding Window, Heap (Priority Queue), Prefix Sum, Monotonic Queue
3546Equal Sum Grid Partition IMedium17Array, Matrix, Enumeration, Prefix Sum
3548Equal Sum Grid Partition IIHard17Array, Hash Table, Matrix, Enumeration, Prefix Sum
1674Minimum Moves to Make Array ComplementaryMedium17Array, Hash Table, Prefix Sum
798Smallest Rotation with Highest ScoreHard17Array, Prefix Sum
523Continuous Subarray SumMedium17Array, Hash Table, Math, Prefix Sum, Pigeonhole Principle
1248Count Number of Nice SubarraysMedium17Array, Hash Table, Math, Sliding Window, Prefix Sum
930Binary Subarrays With SumMedium12Array, Hash Table, Sliding Window, Prefix Sum
1590Make Sum Divisible by PMedium12Array, Hash Table, Prefix Sum
3070Count Submatrices with Top-Left Element and Sum Less Than kMedium12Array, Matrix, Prefix Sum
724Find Pivot IndexEasy12Array, Prefix Sum
2615Sum of DistancesMedium12Array, Hash Table, Prefix Sum
1314Matrix Block SumMedium12Array, Matrix, Prefix Sum
3432Count Partitions with Even Sum DifferenceEasy12Array, Math, Prefix Sum
363Max Sum of Rectangle No Larger Than KHard12Array, Binary Search, Matrix, Prefix Sum, Ordered Set
1124Longest Well-Performing IntervalMedium12Array, Hash Table, Stack, Monotonic Stack, Prefix Sum
3427Sum of Variable Length SubarraysEasy12Array, Prefix Sum

02 · Two Pointers 48

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

Done#ProblemLevelFrequencyTopicsLinks
153SumMedium70Array, Two Pointers, Sorting
42Trapping Rain WaterHard70Array, Two Pointers, Dynamic Programming, Stack, Monotonic Stack
4Median of Two Sorted ArraysHard69Array, Binary Search, Divide and Conquer
5Longest Palindromic SubstringMedium64Two Pointers, String, Dynamic Programming, Manacher
11Container With Most WaterMedium63Array, Two Pointers, Greedy
26Remove Duplicates from Sorted ArrayEasy62Array, Two Pointers
88Merge Sorted ArrayEasy60Array, Two Pointers, Sorting
184SumMedium54Array, Two Pointers, Sorting
1768Merge Strings AlternatelyEasy52Two Pointers, String
189Rotate ArrayMedium51Array, Math, Two Pointers
283Move ZeroesEasy50Array, Two Pointers
167Two Sum II - Input Array Is SortedMedium50Array, Two Pointers, Binary Search
163Sum ClosestMedium49Array, Two Pointers, Sorting
27Remove ElementEasy48Array, Two Pointers
31Next PermutationMedium48Array, Two Pointers
344Reverse StringEasy47Two Pointers, String
125Valid PalindromeEasy46Two Pointers, String
75Sort ColorsMedium45Array, Two Pointers, Sorting, Quicksort, Bubble Sort
977Squares of a Sorted ArrayEasy41Array, Two Pointers, Sorting
345Reverse Vowels of a StringEasy40Two Pointers, String
80Remove Duplicates from Sorted Array IIMedium40Array, Two Pointers
777Swap Adjacent in LR StringMedium39Two Pointers, String
680Valid Palindrome IIEasy35Two Pointers, String, Greedy
455Assign CookiesEasy33Array, Two Pointers, Greedy, Sorting, Quicksort
443String CompressionMedium28Two Pointers, String
2149Rearrange Array Elements by SignMedium28Array, Two Pointers, Simulation
844Backspace String CompareEasy28Two Pointers, String, Stack, Simulation
3302Find the Lexicographically Smallest Valid SequenceMedium28Two Pointers, String, Dynamic Programming, Greedy
392Is SubsequenceEasy25Two Pointers, String, Dynamic Programming
2337Move Pieces to Obtain a StringMedium25Two Pointers, String
881Boats to Save PeopleMedium25Array, Two Pointers, Greedy, Sorting, Timsort
832Flipping an ImageEasy22Array, Two Pointers, Bit Manipulation, Matrix, Simulation
633Sum of Square NumbersMedium22Math, Two Pointers, Binary Search
160Intersection of Two Linked ListsEasy17Hash Table, Linked List, Two Pointers
653Two Sum IV - Input is a BSTEasy17Hash Table, Two Pointers, Tree, Depth-First Search, Breadth-First Search, Binary Search Tree, Binary Tree
696Count Binary SubstringsEasy17Two Pointers, String
1861Rotating the BoxMedium17Array, Two Pointers, Matrix
532K-diff Pairs in an ArrayMedium17Array, Hash Table, Two Pointers, Binary Search, Sorting
3643Flip Square Submatrix VerticallyEasy12Array, Two Pointers, Matrix
2332The Latest Time to Catch a BusMedium12Array, Two Pointers, Binary Search, Sorting
165Compare Version NumbersMedium12Two Pointers, String
9233Sum With MultiplicityMedium12Array, Hash Table, Two Pointers, Sorting, Counting
1163Last Substring in Lexicographical OrderHard12Two Pointers, String, Lyndon Factorization
3867Sum of GCD of Formed PairsMedium12Array, Math, Two Pointers, Sorting, Simulation, Number Theory
1089Duplicate ZerosEasy12Array, Two Pointers
556Next Greater Element IIIMedium12Math, Two Pointers, String
905Sort Array By ParityEasy12Array, Two Pointers, Sorting
611Valid Triangle NumberMedium12Array, Two Pointers, Binary Search, Greedy, Sorting

03 · Sliding Window 32

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

Done#ProblemLevelFrequencyTopicsLinks
3Longest Substring Without Repeating CharactersMedium69Hash Table, String, Sliding Window
121Best Time to Buy and Sell StockEasy69Array, Dynamic Programming
239Sliding Window MaximumHard48Array, Queue, Sliding Window, Heap (Priority Queue), Monotonic Queue, Range Minimum/Maximum Query
424Longest Repeating Character ReplacementMedium47Hash Table, String, Sliding Window
904Fruit Into BasketsMedium44Array, Hash Table, Sliding Window
219Contains Duplicate IIEasy44Array, Hash Table, Sliding Window
209Minimum Size Subarray SumMedium43Array, Binary Search, Sliding Window, Prefix Sum
643Maximum Average Subarray IEasy43Array, Sliding Window
1004Max Consecutive Ones IIIMedium41Array, Binary Search, Sliding Window, Prefix Sum
1838Frequency of the Most Frequent ElementMedium33Array, Binary Search, Greedy, Sliding Window, Sorting, Prefix Sum
1358Number of Substrings Containing All Three CharactersMedium31Hash Table, String, Sliding Window
713Subarray Product Less Than KMedium31Array, Binary Search, Sliding Window, Prefix Sum
30Substring with Concatenation of All WordsHard28Hash Table, String, Sliding Window
76Minimum Window SubstringHard25Hash Table, String, Sliding Window
438Find All Anagrams in a StringMedium22Hash Table, String, Sliding Window
567Permutation in StringMedium22Hash Table, Two Pointers, String, Sliding Window
2461Maximum Sum of Distinct Subarrays With Length KMedium22Array, Hash Table, Sliding Window
1461Check If a String Contains All Binary Codes of Size KMedium17Hash Table, String, Bit Manipulation, Rolling Hash, Hash Function, Directed Acyclic Graph
1658Minimum Operations to Reduce X to ZeroMedium17Array, Hash Table, Binary Search, Sliding Window, Prefix Sum
594Longest Harmonious SubsequenceEasy17Array, Hash Table, Sliding Window, Sorting, Counting
1695Maximum Erasure ValueMedium17Array, Hash Table, Sliding Window
2958Length of Longest Subarray With at Most K FrequencyMedium17Array, Hash Table, Sliding Window
3090Maximum Length Substring With Two OccurrencesEasy17Hash Table, String, Sliding Window
413Arithmetic SlicesMedium12Array, Dynamic Programming, Sliding Window
992Subarrays with K Different IntegersHard12Array, Hash Table, Sliding Window, Counting
1888Minimum Number of Flips to Make the Binary String AlternatingMedium12String, Dynamic Programming, Sliding Window
1423Maximum Points You Can Obtain from CardsMedium12Array, Sliding Window, Prefix Sum
3356Zero Array Transformation IIMedium12Array, Two Pointers, Binary Search, Prefix Sum
1763Longest Nice SubstringEasy12Hash Table, String, Divide and Conquer, Bit Manipulation, Sliding Window
718Maximum Length of Repeated SubarrayMedium12Array, Binary Search, Dynamic Programming, Sliding Window, Rolling Hash, Hash Function
1343Number of Sub-arrays of Size K and Average Greater than or Equal to ThresholdMedium12Array, Sliding Window
395Longest Substring with At Least K Repeating CharactersMedium12Hash Table, String, Divide and Conquer, Sliding Window

04 · Fast & Slow Pointers 13

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

Done#ProblemLevelFrequencyTopicsLinks
202Happy NumberEasy50Hash Table, Math, Two Pointers, Floyd's Cycle Finding Algorithm
876Middle of the Linked ListEasy48Linked List, Two Pointers
41First Missing PositiveHard46Array, Hash Table
287Find the Duplicate NumberMedium45Array, Two Pointers, Binary Search, Bit Manipulation, Pigeonhole Principle, Floyd's Cycle Finding Algorithm
234Palindrome Linked ListEasy41Linked List, Two Pointers, Stack, Recursion
141Linked List CycleEasy39Hash Table, Linked List, Two Pointers, Floyd's Cycle Finding Algorithm
19Remove Nth Node From End of ListMedium37Linked List, Two Pointers
148Sort ListMedium37Linked List, Two Pointers, Divide and Conquer, Sorting, Merge Sort
143Reorder ListMedium35Linked List, Two Pointers, Stack, Recursion
442Find All Duplicates in an ArrayMedium25Array, Hash Table, Sorting
2095Delete the Middle Node of a Linked ListMedium25Linked List, Two Pointers
142Linked List Cycle IIMedium22Hash Table, Linked List, Two Pointers, Floyd's Cycle Finding Algorithm
457Circular Array LoopMedium17Array, Hash Table, Two Pointers, Floyd's Cycle Finding Algorithm

05 · LinkedList In-place Reversal 21

19 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 NumbersMedium77Linked List, Math, Recursion
21Merge Two Sorted ListsEasy57Linked List, Recursion
206Reverse Linked ListEasy55Linked List, Recursion
25Reverse Nodes in k-GroupHard41Linked List, Recursion
83Remove Duplicates from Sorted ListEasy41Linked List
61Rotate ListMedium39Linked List, Two Pointers
138Copy List with Random PointerMedium35Hash Table, Linked List
328Odd Even Linked ListMedium33Linked List
24Swap Nodes in PairsMedium31Linked List, Recursion
92Reverse Linked List IIMedium28Linked List
109Convert Sorted List to Binary Search TreeMedium28Linked List, Divide and Conquer, Tree, Binary Search Tree, Binary Tree
707Design Linked ListMedium22Linked List, Design
82Remove Duplicates from Sorted List IIMedium22Linked List, Two Pointers
237Delete Node in a Linked ListMedium17Linked List
2074Reverse Nodes in Even Length GroupsMedium17Linked List
86Partition ListMedium12Linked List, Two Pointers
705Design HashSetEasy12Array, Hash Table, Linked List, Design, Hash Function
2058Find the Minimum and Maximum Number of Nodes Between Critical PointsMedium12Linked List
445Add Two Numbers IIMedium12Linked List, Math, Stack
706Design HashMapEasy12Array, Hash Table, Linked List, Design, Hash Function
147Insertion Sort ListMedium12Linked List, Sorting

06 · Monotonic Stack 18

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

Done#ProblemLevelFrequencyTopicsLinks
496Next Greater Element IEasy47Array, Hash Table, Stack, Monotonic Stack
84Largest Rectangle in HistogramHard46Array, Stack, Monotonic Stack, Range Minimum/Maximum Query
503Next Greater Element IIMedium46Array, Stack, Monotonic Stack
739Daily TemperaturesMedium45Array, Stack, Monotonic Stack
1944Number of Visible People in a QueueHard44Array, Stack, Monotonic Stack
85Maximal RectangleHard39Array, Dynamic Programming, Stack, Matrix, Monotonic Stack
1081Smallest Subsequence of Distinct CharactersMedium33String, Stack, Greedy, Monotonic Stack
907Sum of Subarray MinimumsMedium28Array, Dynamic Programming, Stack, Monotonic Stack
402Remove K DigitsMedium25String, Stack, Greedy, Monotonic Stack
901Online Stock SpanMedium25Stack, Design, Monotonic Stack, Data Stream
581Shortest Unsorted Continuous SubarrayMedium22Array, Two Pointers, Stack, Greedy, Sorting, Monotonic Stack
853Car FleetMedium22Array, Stack, Sorting, Monotonic Stack
1475Final Prices With a Special Discount in a ShopEasy17Array, Stack, Monotonic Stack
975Odd Even JumpHard17Array, Dynamic Programming, Stack, Sorting, Monotonic Stack, Ordered Set
316Remove Duplicate LettersMedium17String, Stack, Greedy, Monotonic Stack
962Maximum Width RampMedium12Array, Two Pointers, Stack, Monotonic Stack
1008Construct Binary Search Tree from Preorder TraversalMedium12Array, Stack, Tree, Binary Search Tree, Monotonic Stack, Binary Tree
2104Sum of Subarray RangesMedium12Array, Stack, Monotonic Stack

07 · Top 'K' Elements 24

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

Done#ProblemLevelFrequencyTopicsLinks
347Top K Frequent ElementsMedium54Array, Hash Table, Divide and Conquer, Sorting, Heap (Priority Queue), Bucket Sort, Counting, Quickselect
215Kth Largest Element in an ArrayMedium45Array, Divide and Conquer, Sorting, Heap (Priority Queue), Quickselect
295Find Median from Data StreamHard40Two Pointers, Design, Sorting, Heap (Priority Queue), Data Stream
1464Maximum Product of Two Elements in an ArrayEasy35Array, Sorting, Heap (Priority Queue)
621Task SchedulerMedium33Array, Hash Table, Greedy, Sorting, Heap (Priority Queue), Counting
703Kth Largest Element in a StreamEasy33Tree, Design, Binary Search Tree, Heap (Priority Queue), Binary Tree, Data Stream
767Reorganize StringMedium28Hash Table, String, Greedy, Sorting, Heap (Priority Queue), Counting
373Find K Pairs with Smallest SumsMedium25Array, Heap (Priority Queue)
23Merge k Sorted ListsHard22Linked List, Divide and Conquer, Heap (Priority Queue), Merge Sort, Tournament Sort
451Sort Characters By FrequencyMedium22Hash Table, String, Sorting, Heap (Priority Queue), Bucket Sort, Counting
1046Last Stone WeightEasy22Array, Heap (Priority Queue)
658Find K Closest ElementsMedium17Array, Two Pointers, Binary Search, Sliding Window, Sorting, Heap (Priority Queue)
2344Minimum Deletions to Make Array DivisibleHard17Array, Math, Sorting, Heap (Priority Queue), Number Theory, Euclidean Algorithm, Greatest Common Divisor
355Design TwitterMedium17Hash Table, Linked List, Design, Heap (Priority Queue)
502IPOHard17Array, Greedy, Sorting, Heap (Priority Queue)
1834Single-Threaded CPUMedium17Array, Sorting, Heap (Priority Queue)
3296Minimum Number of Seconds to Make Mountain Height ZeroMedium12Array, Math, Binary Search, Greedy, Heap (Priority Queue)
1878Get Biggest Three Rhombus Sums in a GridMedium12Array, Math, Sorting, Heap (Priority Queue), Matrix, Prefix Sum
358Rearrange String k Distance Apart PremiumHard12Hash Table, String, Greedy, Sorting, Heap (Priority Queue), Counting
2034Stock Price Fluctuation Medium12Hash Table, Design, Heap (Priority Queue), Data Stream, Ordered Set
1353Maximum Number of Events That Can Be AttendedMedium12Array, Greedy, Sorting, Heap (Priority Queue)
871Minimum Number of Refueling StopsHard12Array, Dynamic Programming, Greedy, Heap (Priority Queue)
2402Meeting Rooms IIIHard12Array, Hash Table, Sorting, Heap (Priority Queue), Simulation
264Ugly Number IIMedium12Hash Table, Math, Dynamic Programming, Heap (Priority Queue)

08 · Overlapping Intervals 12

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

Done#ProblemLevelFrequencyTopicsLinks
56Merge IntervalsMedium56Array, Sorting, Quicksort
253Meeting Rooms II PremiumMedium45Array, Two Pointers, Greedy, Sorting, Heap (Priority Queue), Prefix Sum
57Insert IntervalMedium37Array
1094Car PoolingMedium35Array, Sorting, Heap (Priority Queue), Simulation, Prefix Sum
1288Remove Covered IntervalsMedium25Array, Sorting
715Range ModuleHard22Design, Segment Tree, Ordered Set
228Summary RangesEasy22Array
435Non-overlapping IntervalsMedium22Array, Dynamic Programming, Greedy, Sorting
452Minimum Number of Arrows to Burst BalloonsMedium22Array, Greedy, Sorting
759Employee Free Time PremiumHard17Array, Sweep Line, Sorting, Heap (Priority Queue)
763Partition LabelsMedium12Hash Table, Two Pointers, String, Greedy
1851Minimum Interval to Include Each QueryHard12Array, Binary Search, Sweep Line, Sorting, Heap (Priority Queue)

09 · Modified Binary Search 42

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

Done#ProblemLevelFrequencyTopicsLinks
875Koko Eating BananasMedium54Array, Binary Search
33Search in Rotated Sorted ArrayMedium53Array, Binary Search
69Sqrt(x)Easy52Math, Binary Search, Newton's Method
410Split Array Largest SumHard50Array, Binary Search, Dynamic Programming, Greedy, Prefix Sum
349Intersection of Two ArraysEasy50Array, Hash Table, Two Pointers, Binary Search, Sorting
35Search Insert PositionEasy49Array, Binary Search
704Binary SearchEasy48Array, Binary Search
268Missing NumberEasy47Array, Hash Table, Math, Binary Search, Bit Manipulation, Sorting
162Find Peak ElementMedium47Array, Binary Search
34Find First and Last Position of Element in Sorted ArrayMedium44Array, Binary Search
540Single Element in a Sorted ArrayMedium44Array, Binary Search
354Russian Doll EnvelopesHard41Array, Binary Search, Dynamic Programming, Sorting, Longest Increasing Subsequence
74Search a 2D MatrixMedium40Array, Binary Search, Matrix
1011Capacity To Ship Packages Within D DaysMedium37Array, Binary Search
240Search a 2D Matrix IIMedium37Array, Binary Search, Divide and Conquer, Matrix
81Search in Rotated Sorted Array IIMedium37Array, Binary Search
278First Bad VersionEasy35Binary Search, Interactive
1539Kth Missing Positive NumberEasy35Array, Binary Search
852Peak Index in a Mountain ArrayMedium31Array, Binary Search, Ternary Search
981Time Based Key-Value StoreMedium31Hash Table, String, Binary Search, Design
153Find Minimum in Rotated Sorted ArrayMedium28Array, Binary Search
1482Minimum Number of Days to Make m BouquetsMedium28Array, Binary Search
2035Partition Array Into Two Arrays to Minimize Sum DifferenceHard28Array, Two Pointers, Binary Search, Dynamic Programming, Bit Manipulation, Meet in the Middle, Sorting, Ordered Set, Bitmask
367Valid Perfect SquareEasy28Math, Binary Search
154Find Minimum in Rotated Sorted Array IIHard22Array, Binary Search
1044Longest Duplicate SubstringHard17String, Binary Search, Sliding Window, Rolling Hash, Suffix Array, Hash Function, Suffix Automaton, Suffix Tree, Z Algorithm, Boyer–Moore String-Search Algorithm
1235Maximum Profit in Job SchedulingHard17Array, Binary Search, Dynamic Programming, Sorting
3464Maximize the Distance Between Points on a SquareHard17Array, Math, Binary Search, Geometry, Sorting
2540Minimum Common ValueEasy17Array, Hash Table, Two Pointers, Binary Search
3633Earliest Finish Time for Land and Water Rides IEasy17Array, Two Pointers, Binary Search, Greedy, Sorting
2187Minimum Time to Complete TripsMedium17Array, Binary Search
400Nth DigitMedium12Math, Binary Search
1095Find in Mountain ArrayHard12Array, Binary Search, Interactive, Ternary Search
3488Closest Equal Element QueriesMedium12Array, Hash Table, Binary Search
3932Count K-th Roots in a RangeMedium12Math, Binary Search
2089Find Target Indices After Sorting ArrayEasy12Array, Binary Search, Sorting
1146Snapshot ArrayMedium12Array, Hash Table, Binary Search, Design, Persistent Data Structure
1760Minimum Limit of Balls in a BagMedium12Array, Binary Search
2498Frog Jump IIMedium12Array, Binary Search, Greedy
2226Maximum Candies Allocated to K ChildrenMedium12Array, Binary Search
878Nth Magical NumberHard12Math, Binary Search, Least Common Multiple, Inclusion-Exclusion Principle
1552Magnetic Force Between Two BallsMedium12Array, Binary Search, Sorting

10 · Binary Tree Traversal 49

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

Done#ProblemLevelFrequencyTopicsLinks
102Binary Tree Level Order TraversalMedium46Tree, Breadth-First Search, Binary Tree
100Same TreeEasy45Tree, Depth-First Search, Breadth-First Search, Binary Tree
94Binary Tree Inorder TraversalEasy43Stack, Tree, Depth-First Search, Binary Tree
104Maximum Depth of Binary TreeEasy41Tree, Depth-First Search, Breadth-First Search, Binary Tree
101Symmetric TreeEasy35Tree, Depth-First Search, Breadth-First Search, Binary Tree
543Diameter of Binary TreeEasy35Tree, Depth-First Search, Binary Tree, DP on Trees
110Balanced Binary TreeEasy33Tree, Depth-First Search, Binary Tree
226Invert Binary TreeEasy33Tree, Depth-First Search, Breadth-First Search, Binary Tree
236Lowest Common Ancestor of a Binary TreeMedium33Tree, Depth-First Search, Binary Tree, Binary Lifting, Lowest Common Ancestor
103Binary Tree Zigzag Level Order TraversalMedium33Tree, Breadth-First Search, Binary Tree
662Maximum Width of Binary TreeMedium33Tree, Depth-First Search, Breadth-First Search, Binary Tree
105Construct Binary Tree from Preorder and Inorder TraversalMedium31Array, Hash Table, Divide and Conquer, Tree, Binary Tree
700Search in a Binary Search TreeEasy31Tree, Binary Search Tree, Binary Tree
124Binary Tree Maximum Path SumHard28Dynamic Programming, Tree, Depth-First Search, Binary Tree, DP on Trees
230Kth Smallest Element in a BSTMedium25Tree, Depth-First Search, Binary Search Tree, Binary Tree
98Validate Binary Search TreeMedium25Tree, Depth-First Search, Binary Search Tree, Binary Tree
1110Delete Nodes And Return ForestMedium25Array, Hash Table, Tree, Depth-First Search, Binary Tree
199Binary Tree Right Side ViewMedium25Tree, Depth-First Search, Breadth-First Search, Binary Tree
222Count Complete Tree NodesMedium25Binary Search, Bit Manipulation, Tree, Binary Tree
108Convert Sorted Array to Binary Search TreeEasy22Array, Divide and Conquer, Tree, Binary Search Tree, Binary Tree
99Recover Binary Search TreeMedium22Tree, Depth-First Search, Binary Search Tree, Binary Tree
235Lowest Common Ancestor of a Binary Search TreeMedium22Tree, Depth-First Search, Binary Search Tree, Binary Tree, Binary Lifting, Lowest Common Ancestor
144Binary Tree Preorder TraversalEasy22Stack, Tree, Depth-First Search, Binary Tree
834Sum of Distances in TreeHard22Dynamic Programming, Tree, Depth-First Search, Graph Theory, DP on Trees
530Minimum Absolute Difference in BSTEasy22Tree, Depth-First Search, Breadth-First Search, Binary Search Tree, Binary Tree
3559Number of Ways to Assign Edge Weights IIHard22Array, Math, Dynamic Programming, Bit Manipulation, Tree, Depth-First Search
297Serialize and Deserialize Binary TreeHard17String, Tree, Depth-First Search, Breadth-First Search, Design, Binary Tree
95Unique Binary Search Trees IIMedium17Dynamic Programming, Backtracking, Tree, Binary Search Tree, Binary Tree
701Insert into a Binary Search TreeMedium17Tree, Binary Search Tree, Binary Tree
501Find Mode in Binary Search TreeEasy17Tree, Depth-First Search, Binary Search Tree, Binary Tree
96Unique Binary Search TreesMedium17Math, Dynamic Programming, Tree, Binary Search Tree, Binary Tree
938Range Sum of BSTEasy17Tree, Depth-First Search, Binary Search Tree, Binary Tree
114Flatten Binary Tree to Linked ListMedium17Linked List, Stack, Tree, Depth-First Search, Binary Tree
366Find Leaves of Binary Tree PremiumMedium17Tree, Depth-First Search, Binary Tree, DP on Trees
1483Kth Ancestor of a Tree NodeHard17Binary Search, Dynamic Programming, Bit Manipulation, Tree, Depth-First Search, Breadth-First Search, Design, Binary Lifting
2096Step-By-Step Directions From a Binary Tree Node to AnotherMedium17String, Tree, Depth-First Search, Binary Tree, Binary Lifting, Lowest Common Ancestor
450Delete Node in a BSTMedium12Tree, Binary Search Tree, Binary Tree
116Populating Next Right Pointers in Each NodeMedium12Linked List, Tree, Depth-First Search, Breadth-First Search, Binary Tree
1161Maximum Level Sum of a Binary TreeMedium12Tree, Depth-First Search, Breadth-First Search, Binary Tree
572Subtree of Another TreeEasy12Tree, Depth-First Search, String Matching, Binary Tree, Hash Function
1022Sum of Root To Leaf Binary NumbersEasy12Tree, Depth-First Search, Binary Tree
107Binary Tree Level Order Traversal IIMedium12Tree, Breadth-First Search, Binary Tree
427Construct Quad TreeMedium12Array, Divide and Conquer, Tree, Matrix
404Sum of Left LeavesEasy12Tree, Depth-First Search, Breadth-First Search, Binary Tree
2196Create Binary Tree From DescriptionsMedium12Array, Hash Table, Tree, Binary Tree
106Construct Binary Tree from Inorder and Postorder TraversalMedium12Array, Hash Table, Divide and Conquer, Tree, Binary Tree
987Vertical Order Traversal of a Binary TreeHard12Hash Table, Tree, Depth-First Search, Breadth-First Search, Sorting, Binary Tree
965Univalued Binary TreeEasy12Tree, Depth-First Search, Breadth-First Search, Binary Tree
979Distribute Coins in Binary TreeMedium12Tree, Depth-First Search, Binary Tree, DP on Trees

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

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

Done#ProblemLevelFrequencyTopicsLinks
207Course ScheduleMedium44Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort, Directed Acyclic Graph
547Number of ProvincesMedium37Depth-First Search, Breadth-First Search, Union-Find, Graph Theory
329Longest Increasing Path in a MatrixHard31Array, Dynamic Programming, Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort, Memoization, Matrix, Directed Acyclic Graph
3481Apply Substitutions PremiumMedium28Array, Hash Table, String, Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort
133Clone GraphMedium28Hash Table, Depth-First Search, Breadth-First Search, Graph Theory
399Evaluate DivisionMedium22Array, String, Depth-First Search, Breadth-First Search, Union-Find, Graph Theory, Shortest Path, Bellman–Ford Algorithm, Floyd–Warshall Algorithm
210Course Schedule IIMedium17Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort
444Sequence Reconstruction PremiumMedium17Array, Graph Theory, Topological Sort, Directed Acyclic Graph
269Alien Dictionary PremiumHard17Array, String, Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort, Directed Acyclic Graph
463Island PerimeterEasy17Array, Depth-First Search, Breadth-First Search, Matrix
332Reconstruct ItineraryHard17Array, String, Depth-First Search, Graph Theory, Sorting, Heap (Priority Queue), Eulerian Circuit, Eulerian Path, Semi-Eulerian Graph
1376Time Needed to Inform All EmployeesMedium12Tree, Depth-First Search, Breadth-First Search
1448Count Good Nodes in Binary TreeMedium12Tree, Depth-First Search, Breadth-First Search, Binary Tree
386Lexicographical NumbersMedium12Depth-First Search, Trie
1192Critical Connections in a NetworkHard12Depth-First Search, Graph Theory, Biconnected Component, Bridge (Graph)
440K-th Smallest in Lexicographical OrderHard12Trie
2421Number of Good PathsHard12Array, Hash Table, Tree, Union-Find, Graph Theory, Sorting
1466Reorder Routes to Make All Paths Lead to the City ZeroMedium12Depth-First Search, Breadth-First Search, Graph Theory
841Keys and RoomsMedium12Depth-First Search, Breadth-First Search, Graph Theory
3203Find Minimum Diameter After Merging Two TreesHard12Tree, Depth-First Search, Breadth-First Search, Graph Theory
3310Remove Methods From ProjectMedium12Depth-First Search, Breadth-First Search, Graph Theory
129Sum Root to Leaf NumbersMedium12Tree, Depth-First Search, Binary Tree
1306Jump Game IIIMedium12Array, Depth-First Search, Breadth-First Search

12 · Breadth-First Search (BFS) 18

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

Done#ProblemLevelFrequencyTopicsLinks
994Rotting OrangesMedium46Array, Breadth-First Search, Matrix
127Word LadderHard37Hash Table, String, Breadth-First Search, Bidirectional Search
815Bus RoutesHard31Array, Hash Table, Breadth-First Search
126Word Ladder IIHard28Hash Table, String, Backtracking, Breadth-First Search, Bidirectional Search
54201 MatrixMedium25Array, Dynamic Programming, Breadth-First Search, Matrix
863All Nodes Distance K in Binary TreeMedium22Hash Table, Tree, Depth-First Search, Breadth-First Search, Binary Tree
3629Minimum Jumps to Reach End via Prime TeleportationMedium17Array, Hash Table, Math, Breadth-First Search, Number Theory
111Minimum Depth of Binary TreeEasy17Tree, Depth-First Search, Breadth-First Search, Binary Tree
310Minimum Height TreesMedium17Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort
2045Second Minimum Time to Reach DestinationHard17Breadth-First Search, Graph Theory, Shortest Path, Dijkstra's Algorithm, K Shortest Path
1091Shortest Path in Binary MatrixMedium12Array, Breadth-First Search, Matrix
934Shortest BridgeMedium12Array, Depth-First Search, Breadth-First Search, Matrix
847Shortest Path Visiting All NodesHard12Dynamic Programming, Bit Manipulation, Breadth-First Search, Graph Theory, Bitmask
1345Jump Game IVHard12Array, Hash Table, Breadth-First Search
1129Shortest Path with Alternating ColorsMedium12Breadth-First Search, Graph Theory
433Minimum Genetic MutationMedium12Hash Table, String, Breadth-First Search, Bidirectional Search
864Shortest Path to Get All KeysHard12Array, Bit Manipulation, Breadth-First Search, Matrix
286Walls and Gates PremiumMedium12Array, Breadth-First Search, Matrix

13 · Matrix Traversal 23

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

Done#ProblemLevelFrequencyTopicsLinks
200Number of IslandsMedium58Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix
48Rotate ImageMedium54Array, Math, Matrix
54Spiral MatrixMedium53Array, Matrix, Simulation
73Set Matrix ZeroesMedium39Array, Hash Table, Matrix
130Surrounded RegionsMedium33Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix
2965Find Missing and Repeated ValuesEasy31Array, Hash Table, Math, Matrix
778Swim in Rising WaterHard28Array, Binary Search, Depth-First Search, Breadth-First Search, Union-Find, Minimax, Heap (Priority Queue), Matrix, Dijkstra's Algorithm
417Pacific Atlantic Water FlowMedium25Array, Depth-First Search, Breadth-First Search, Matrix
733Flood FillEasy22Array, Depth-First Search, Breadth-First Search, Matrix
1254Number of Closed IslandsMedium17Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix
3567Minimum Absolute Difference in Sliding SubmatrixMedium17Array, Sorting, Matrix
2022Convert 1D Array Into 2D ArrayEasy17Array, Matrix, Simulation
1559Detect Cycles in 2D GridMedium17Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix
566Reshape the MatrixEasy17Array, Matrix, Simulation
695Max Area of IslandMedium17Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix
1260Shift 2D GridEasy17Array, Matrix, Simulation
1672Richest Customer WealthEasy17Array, Matrix
407Trapping Rain Water IIHard12Array, Breadth-First Search, Heap (Priority Queue), Matrix
2946Matrix Similarity After Cyclic ShiftsEasy12Array, Math, Matrix, Simulation
874Walking Robot SimulationMedium12Array, Hash Table, Simulation
1391Check if There is a Valid Path in a GridMedium12Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix
1914Cyclically Rotating a GridMedium12Array, Matrix, Simulation
2768Number of Black BlocksMedium12Array, Hash Table, Enumeration

14 · Backtracking 23

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

Done#ProblemLevelFrequencyTopicsLinks
22Generate ParenthesesMedium53String, Dynamic Programming, Backtracking, Bracket Sequences
17Letter Combinations of a Phone NumberMedium50Hash Table, String, Backtracking
51N-QueensHard50Array, Backtracking, Algorithm X
39Combination SumMedium47Array, Backtracking
46PermutationsMedium46Array, Backtracking
78SubsetsMedium39Array, Backtracking, Bit Manipulation
90Subsets IIMedium37Array, Backtracking, Bit Manipulation
131Palindrome PartitioningMedium37String, Dynamic Programming, Backtracking
79Word SearchMedium33Array, String, Backtracking, Depth-First Search, Matrix
37Sudoku SolverHard25Array, Hash Table, Backtracking, Matrix, Algorithm X, Dancing Links
60Permutation SequenceHard25Math, Recursion
77CombinationsMedium25Backtracking
47Permutations IIMedium25Array, Backtracking, Sorting
1291Sequential DigitsMedium25Enumeration
40Combination Sum IIMedium22Array, Backtracking
1415The k-th Lexicographical String of All Happy Strings of Length nMedium17String, Backtracking
67924 GameHard17Array, Math, Backtracking
784Letter Case PermutationMedium17String, Backtracking, Bit Manipulation
257Binary Tree PathsEasy12String, Backtracking, Tree, Depth-First Search, Binary Tree
212Word Search IIHard12Array, String, Backtracking, Trie, Matrix
1240Tiling a Rectangle with the Fewest SquaresHard12Backtracking
3348Smallest Divisible Digit Product IIHard12Math, String, Backtracking, Greedy, Number Theory
1723Find Minimum Time to Finish All JobsHard12Array, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask

15 · Dynamic Programming Patterns 92

88 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 SubarrayMedium59Array, Divide and Conquer, Dynamic Programming
198House RobberMedium51Array, Dynamic Programming
70Climbing StairsEasy50Math, Dynamic Programming, Memoization
152Maximum Product SubarrayMedium45Array, Dynamic Programming
322Coin ChangeMedium45Array, Dynamic Programming, Breadth-First Search, Knapsack Problem, Complete Knapsack
118Pascal's TriangleEasy44Array, Dynamic Programming
10Regular Expression MatchingHard43String, Dynamic Programming, Recursion
509Fibonacci NumberEasy43Math, Dynamic Programming, Recursion, Memoization
300Longest Increasing SubsequenceMedium41Array, Binary Search, Dynamic Programming, Longest Increasing Subsequence
416Partition Equal Subset SumMedium41Array, Dynamic Programming, Knapsack Problem, 0-1 Knapsack
62Unique PathsMedium40Math, Dynamic Programming, Combinatorics
32Longest Valid ParenthesesHard37String, Dynamic Programming, Stack, Bracket Sequences
72Edit DistanceMedium37String, Dynamic Programming
486Predict the WinnerMedium35Array, Math, Dynamic Programming, Recursion, Minimax, Game Theory, Zero-Sum Game
139Word BreakMedium33Array, Hash Table, String, Dynamic Programming, Trie, Memoization, Brute-Force Search
877Stone GameMedium33Array, Math, Dynamic Programming, Minimax, Game Theory, Zero-Sum Game
312Burst BalloonsHard31Array, Dynamic Programming
44Wildcard MatchingHard31String, Dynamic Programming, Greedy, Recursion
746Min Cost Climbing StairsEasy31Array, Dynamic Programming
1406Stone Game IIIHard31Array, Math, Dynamic Programming, Minimax, Game Theory, Zero-Sum Game
494Target SumMedium28Array, Dynamic Programming, Backtracking, Knapsack Problem, 0-1 Knapsack
518Coin Change IIMedium28Array, Dynamic Programming, Knapsack Problem, Complete Knapsack
3225Maximum Score From Grid OperationsHard28Array, Dynamic Programming, Matrix, Prefix Sum
3742Maximum Path Score in a GridMedium28Array, Dynamic Programming, Matrix
213House Robber IIMedium25Array, Dynamic Programming
221Maximal SquareMedium25Array, Dynamic Programming, Matrix
1143Longest Common SubsequenceMedium25String, Dynamic Programming, Longest Common Subsequence
368Largest Divisible SubsetMedium25Array, Math, Dynamic Programming, Sorting
3592Inverse Coin ChangeMedium25Array, Dynamic Programming
931Minimum Falling Path SumMedium25Array, Dynamic Programming, Matrix
983Minimum Cost For TicketsMedium25Array, Dynamic Programming
918Maximum Sum Circular SubarrayMedium25Array, Divide and Conquer, Dynamic Programming, Queue, Monotonic Queue
1140Stone Game IIMedium25Array, Math, Dynamic Programming, Minimax, Prefix Sum, Game Theory, Zero-Sum Game
3738Longest Non-Decreasing Subarray After Replacing at Most One ElementMedium22Array, Dynamic Programming
1137N-th Tribonacci NumberEasy22Math, Dynamic Programming, Memoization
714Best Time to Buy and Sell Stock with Transaction FeeMedium22Array, Dynamic Programming, Greedy
63Unique Paths IIMedium22Array, Dynamic Programming, Matrix
64Minimum Path SumMedium22Array, Dynamic Programming, Matrix
91Decode WaysMedium22String, Dynamic Programming
1043Partition Array for Maximum SumMedium22Array, Dynamic Programming
741Cherry PickupHard22Array, Dynamic Programming, Matrix
3660Jump Game IXMedium22Array, Dynamic Programming
87Scramble StringHard22String, Dynamic Programming
132Palindrome Partitioning IIHard22String, Dynamic Programming
403Frog JumpHard22Array, Dynamic Programming
3700Number of ZigZag Arrays IIHard22Math, Dynamic Programming
120TriangleMedium17Array, Dynamic Programming
97Interleaving StringMedium17String, Dynamic Programming
343Integer BreakMedium17Math, Dynamic Programming
233Number of Digit OneHard17Math, Dynamic Programming, Recursion
799Champagne TowerMedium17Dynamic Programming
3743Maximize Cyclic Partition ScoreHard17Array, Dynamic Programming
1320Minimum Distance to Type a Word Using Two FingersHard17String, Dynamic Programming
673Number of Longest Increasing SubsequenceMedium17Array, Dynamic Programming, Binary Indexed Tree, Segment Tree, Longest Increasing Subsequence
546Remove BoxesHard17Array, Dynamic Programming, Memoization
1049Last Stone Weight IIMedium17Array, Dynamic Programming, Knapsack Problem, 0-1 Knapsack
396Rotate FunctionMedium17Array, Math, Dynamic Programming
788Rotated DigitsMedium17Math, Dynamic Programming
516Longest Palindromic SubsequenceMedium17String, Dynamic Programming
1340Jump Game VHard17Array, Dynamic Programming, Sorting
3962Maximum Subarray Sum After at Most K SwapsHard17
790Domino and Tromino TilingMedium17Dynamic Programming
1749Maximum Absolute Sum of Any SubarrayMedium17Array, Dynamic Programming
2484Count Palindromic SubsequencesHard17String, Dynamic Programming
1301Number of Paths with Max ScoreHard17Array, Dynamic Programming, Matrix
4002Count Valid SequencesMedium17
174Dungeon GameHard17Array, Dynamic Programming, Matrix
1510Stone Game IVHard17Math, Dynamic Programming, Minimax, Game Theory, Nim Game, Sprague–Grundy Theorem, Zero-Sum Game
1277Count Square Submatrices with All OnesMedium12Array, Dynamic Programming, Matrix
377Combination Sum IVMedium12Array, Dynamic Programming
1048Longest String ChainMedium12Array, Hash Table, Two Pointers, String, Dynamic Programming, Sorting
309Best Time to Buy and Sell Stock with CooldownMedium12Array, Dynamic Programming
119Pascal's Triangle IIEasy12Array, Dynamic Programming
2140Solving Questions With BrainpowerMedium12Array, Dynamic Programming
3753Total Waviness of Numbers in Range IIHard12Math, Dynamic Programming
3751Total Waviness of Numbers in Range IMedium12Math, Dynamic Programming, Enumeration
2400Number of Ways to Reach a Position After Exactly k StepsMedium12Math, Dynamic Programming, Combinatorics
3573Best Time to Buy and Sell Stock VMedium12Array, Dynamic Programming
647Palindromic SubstringsMedium12Two Pointers, String, Dynamic Programming
583Delete Operation for Two StringsMedium12String, Dynamic Programming, Longest Common Subsequence
3976Maximum Subarray Sum After MultiplierMedium12Array, Dynamic Programming
188Best Time to Buy and Sell Stock IVHard12Array, Dynamic Programming
879Profitable SchemesHard12Array, Dynamic Programming, Knapsack Problem, 0-1 Knapsack
3336Find the Number of Subsequences With Equal GCDHard12Array, Math, Dynamic Programming, Number Theory, Euclidean Algorithm, Greatest Common Divisor
1884Egg Drop With 2 Eggs and N FloorsMedium12Math, Dynamic Programming
740Delete and EarnMedium12Array, Hash Table, Dynamic Programming
1092Shortest Common Supersequence Hard12String, Dynamic Programming, Longest Common Subsequence
2376Count Special IntegersHard12Math, Dynamic Programming
123Best Time to Buy and Sell Stock IIIHard12Array, Dynamic Programming
1463Cherry Pickup IIHard12Array, Dynamic Programming, Matrix
638Shopping OffersMedium12Array, Dynamic Programming, Backtracking, Bit Manipulation, Memoization, Bitmask, Knapsack Problem, Complete Knapsack
338Counting BitsEasy12Dynamic Programming, Bit Manipulation

16 · Hash Map & Set 43

32 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
128Longest Consecutive SequenceMedium64Array, Hash Table, Union-Find
169Majority ElementEasy63Array, Hash Table, Divide and Conquer, Sorting, Counting, Boyer–Moore Majority Vote Algorithm
242Valid AnagramEasy57Hash Table, String, Sorting
49Group AnagramsMedium54Array, Hash Table, String, Sorting
217Contains DuplicateEasy50Array, Hash Table, Sorting
205Isomorphic StringsEasy39Hash Table, String
387First Unique Character in a StringEasy37Hash Table, String, Queue, Counting
448Find All Numbers Disappeared in an ArrayEasy37Array, Hash Table
383Ransom NoteEasy35Hash Table, String, Counting
36Valid SudokuMedium31Array, Hash Table, Matrix
229Majority Element IIMedium28Array, Hash Table, Sorting, Counting, Boyer–Moore Majority Vote Algorithm
2657Find the Prefix Common Array of Two ArraysMedium28Array, Hash Table, Bit Manipulation
3121Count the Number of Special Characters IIMedium25Hash Table, String
1207Unique Number of OccurrencesEasy22Array, Hash Table
290Word PatternEasy22Hash Table, String
2007Find Original Array From Doubled ArrayMedium22Array, Hash Table, Greedy, Sorting
833Find And Replace in StringMedium17Array, Hash Table, String, Sorting
1781Sum of Beauty of All SubstringsMedium17Hash Table, String, Counting
953Verifying an Alien DictionaryEasy17Array, Hash Table, String
2840Check if Strings Can be Made Equal With Operations IIMedium17Hash Table, String, Sorting
2956Find Common Elements Between Two ArraysEasy17Array, Hash Table
299Bulls and CowsMedium17Hash Table, String, Counting
771Jewels and StonesEasy12Hash Table, String
1832Check if the Sentence Is PangramEasy12Hash Table, String
811Subdomain Visit CountMedium12Array, Hash Table, String, Counting
3741Minimum Distance Between Three Equal Elements IIMedium12Array, Hash Table
1160Find Words That Can Be Formed by CharactersEasy12Array, Hash Table, String, Counting
554Brick WallMedium12Array, Hash Table
2001Number of Pairs of Interchangeable RectanglesMedium12Array, Hash Table, Math, Counting, Number Theory
2225Find Players With Zero or One LossesMedium12Array, Hash Table, Sorting, Counting
3761Minimum Absolute Distance Between Mirror PairsMedium12Array, Hash Table, Math
1189Maximum Number of BalloonsEasy12Hash Table, String, Counting
963Minimum Area Rectangle IIMedium12Array, Hash Table, Math, Geometry
2215Find the Difference of Two ArraysEasy12Array, Hash Table
3020Find the Maximum Number of Elements in SubsetMedium12Array, Hash Table, Enumeration
2150Find All Lonely Numbers in the ArrayMedium12Array, Hash Table, Counting
3016Minimum Number of Pushes to Type Word IIMedium12Hash Table, String, Greedy, Sorting, Counting
2364Count Number of Bad PairsMedium12Array, Hash Table, Math, Counting
697Degree of an ArrayEasy12Array, Hash Table
1657Determine if Two Strings Are CloseMedium12Hash Table, String, Sorting, Counting
804Unique Morse Code WordsEasy12Array, Hash Table, String
3005Count Elements With Maximum FrequencyEasy12Array, Hash Table, Counting

17 · Stack 21

15 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
394Decode StringMedium46String, Stack, Recursion
155Min StackMedium43Stack, Design
224Basic CalculatorHard35Math, String, Stack, Recursion
232Implement Queue using StacksEasy35Stack, Design, Queue
225Implement Stack using QueuesEasy33Stack, Design, Queue
1047Remove All Adjacent Duplicates In StringEasy33String, Stack
150Evaluate Reverse Polish NotationMedium25Array, Math, Stack
921Minimum Add to Make Parentheses ValidMedium25String, Stack, Greedy, Bracket Sequences
735Asteroid CollisionMedium22Array, Stack, Simulation
71Simplify PathMedium22String, Stack
1021Remove Outermost ParenthesesEasy22String, Stack, Bracket Sequences
678Valid Parenthesis StringMedium22String, Dynamic Programming, Stack, Greedy, Bracket Sequences
636Exclusive Time of FunctionsMedium17Array, Stack
227Basic Calculator IIMedium17Math, String, Stack
1441Build an Array With Stack OperationsMedium17Array, Stack, Simulation
1614Maximum Nesting Depth of the ParenthesesEasy17String, Stack, Bracket Sequences
362Design Hit Counter PremiumMedium12Array, Binary Search, Design, Queue, Data Stream
622Design Circular QueueMedium12Array, Linked List, Design, Queue
1700Number of Students Unable to Eat LunchEasy12Array, Stack, Queue, Simulation
641Design Circular DequeMedium12Array, Linked List, Design, Queue

18 · Greedy 39

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

Done#ProblemLevelFrequencyTopicsLinks
55Jump GameMedium50Array, Dynamic Programming, Greedy
1502Can Make Arithmetic Progression From SequenceEasy47Array, Sorting
122Best Time to Buy and Sell Stock IIMedium44Array, Dynamic Programming, Greedy
912Sort an ArrayMedium43Array, Divide and Conquer, Sorting, Heap (Priority Queue), Merge Sort, Bucket Sort, Radix Sort, Counting Sort
45Jump Game IIMedium40Array, Dynamic Programming, Greedy
3731Find Missing ElementsEasy35Array, Hash Table, Sorting
179Largest NumberMedium33Array, String, Greedy, Sorting
3635Earliest Finish Time for Land and Water Rides IIMedium31Array, Two Pointers, Binary Search, Greedy, Sorting
605Can Place FlowersEasy28Array, Greedy
135CandyHard28Array, Greedy
2996Smallest Missing Integer Greater Than Sequential Prefix SumEasy28Array, Hash Table, Sorting
414Third Maximum NumberEasy25Array, Sorting
1331Rank Transform of an ArrayEasy25Array, Hash Table, Sorting
761Special Binary StringHard22String, Divide and Conquer, Sorting
1727Largest Submatrix With RearrangementsMedium22Array, Greedy, Sorting, Matrix
3474Lexicographically Smallest Generated StringHard22String, Greedy, String Matching
860Lemonade ChangeEasy22Array, Greedy
2784Check if Array is GoodEasy22Array, Hash Table, Sorting
274H-IndexMedium22Array, Sorting, Counting Sort
1846Maximum Element After Decreasing and RearrangingMedium22Array, Greedy, Sorting
3499Maximize Active Section with Trade IMedium22String, Enumeration
134Gas StationMedium17Array, Greedy
1296Divide Array in Sets of K Consecutive NumbersMedium17Array, Hash Table, Greedy, Sorting
1689Partitioning Into Minimum Number Of Deci-Binary NumbersMedium17String, Greedy
561Array PartitionEasy17Array, Greedy, Sorting, Counting Sort
1665Minimum Initial Energy to Finish TasksHard17Array, Greedy, Sorting
846Hand of StraightsMedium17Array, Hash Table, Greedy, Sorting
406Queue Reconstruction by HeightMedium12Array, Binary Indexed Tree, Segment Tree, Sorting
409Longest PalindromeEasy12Hash Table, String, Greedy
2094Finding 3-Digit Even NumbersEasy12Array, Hash Table, Recursion, Sorting, Enumeration
2078Two Furthest Houses With Different ColorsEasy12Array, Greedy
2126Destroying AsteroidsMedium12Array, Greedy, Sorting
2895Minimum Processing TimeMedium12Array, Greedy, Sorting
3689Maximum Total Subarray Value IMedium12Array, Greedy
164Maximum GapMedium12Array, Sorting, Bucket Sort, Radix Sort, Pigeonhole Principle
1833Maximum Ice Cream BarsMedium12Array, Greedy, Sorting, Counting Sort
1589Maximum Sum Obtained of Any PermutationMedium12Array, Greedy, Sorting, Prefix Sum
1710Maximum Units on a TruckEasy12Array, Greedy, Sorting
1365How Many Numbers Are Smaller Than the Current NumberEasy12Array, Hash Table, Sorting, Counting Sort

19 · Trie & Design 13

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

Done#ProblemLevelFrequencyTopicsLinks
146LRU CacheMedium53Hash Table, Linked List, Design, Doubly-Linked List
359Logger Rate Limiter PremiumEasy43Hash Table, Design, Data Stream
421Maximum XOR of Two Numbers in an ArrayMedium39Array, Hash Table, Bit Manipulation, Trie
380Insert Delete GetRandom O(1)Medium35Array, Hash Table, Math, Design, Randomized
208Implement Trie (Prefix Tree)Medium33Hash Table, String, Design, Trie
3043Find the Length of the Longest Common PrefixMedium31Array, Hash Table, String, Trie
460LFU CacheHard25Hash Table, Linked List, Design, Doubly-Linked List
933Number of Recent CallsEasy25Design, Queue, Data Stream
642Design Search Autocomplete System PremiumHard22String, Depth-First Search, Design, Trie, Sorting, Heap (Priority Queue), Data Stream
2452Words Within Two Edits of DictionaryMedium17Array, String, Trie
1603Design Parking SystemEasy12Design, Simulation, Counting
346Moving Average from Data Stream PremiumEasy12Array, Design, Queue, Data Stream
588Design In-Memory File System PremiumHard12Hash Table, String, Design, Trie, Sorting

20 · Shortest Path & MST 9

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

Done#ProblemLevelFrequencyTopicsLinks
787Cheapest Flights Within K StopsMedium37Dynamic Programming, Depth-First Search, Breadth-First Search, Graph Theory, Heap (Priority Queue), Shortest Path
743Network Delay TimeMedium33Depth-First Search, Breadth-First Search, Graph Theory, Heap (Priority Queue), Shortest Path, Dijkstra's Algorithm
1584Min Cost to Connect All PointsMedium22Array, Union-Find, Graph Theory, Minimum Spanning Tree, Prim's Algorithm, Kruskal's Algorithm, Borůvka's Algorithm
1631Path With Minimum EffortMedium22Array, Binary Search, Depth-First Search, Breadth-First Search, Union-Find, Heap (Priority Queue), Matrix, Dijkstra's Algorithm
2812Find the Safest Path in a GridMedium17Array, Binary Search, Breadth-First Search, Union-Find, Heap (Priority Queue), Matrix
3286Find a Safe Walk Through a GridMedium17Array, Breadth-First Search, Graph Theory, Heap (Priority Queue), Matrix, Shortest Path
3600Maximize Spanning Tree Stability with UpgradesHard12Binary Search, Greedy, Union-Find, Graph Theory, Minimum Spanning Tree
1514Path with Maximum ProbabilityMedium12Array, Graph Theory, Heap (Priority Queue), Shortest Path, Dijkstra's Algorithm
1489Find Critical and Pseudo-Critical Edges in Minimum Spanning TreeHard12Union-Find, Graph Theory, Sorting, Minimum Spanning Tree, Strongly Connected Component, Prim's Algorithm, Kruskal's Algorithm, Borůvka's Algorithm

21 · Array & String Basics 80

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

Done#ProblemLevelFrequencyTopicsLinks
1929Concatenation of ArrayEasy68Array, Simulation
14Longest Common PrefixEasy68Array, String, Trie
175Combine Two TablesEasy61Database
13Roman to IntegerEasy59Hash Table, Math, String
1757Recyclable and Low Fat ProductsEasy53Database
2667Create Hello World FunctionEasy52
485Max Consecutive OnesEasy49Array
8String to Integer (atoi)Medium48String
181Employees Earning More Than Their ManagersEasy47Database
6Zigzag ConversionMedium43String
28Find the Index of the First Occurrence in a StringEasy43Two Pointers, String, String Matching, Z Algorithm, Knuth–Morris–Pratt Algorithm, Boyer–Moore String-Search Algorithm
12Integer to RomanMedium40Hash Table, Math, String
58Length of Last WordEasy40String
151Reverse Words in a StringMedium39Two Pointers, String
1752Check if Array Is Sorted and RotatedEasy39Array
1470Shuffle the ArrayEasy39Array
197Rising TemperatureEasy37Database
584Find Customer RefereeEasy35Database
796Rotate StringEasy35String, String Matching
1148Article Views IEasy35Database
595Big CountriesEasy33Database
577Employee BonusEasy31Database
1378Replace Employee ID With The Unique IdentifierEasy28Database
196Delete Duplicate EmailsEasy28Database
1581Customer Who Visited but Did Not Make Any TransactionsEasy28Database
68Text JustificationHard25Array, String, Simulation
2619Array Prototype LastEasy25
38Count and SayMedium25String
182Duplicate EmailsEasy25Database
183Customers Who Never OrderEasy25Database
459Repeated Substring PatternEasy25String, String Matching, Z Algorithm, Knuth–Morris–Pratt Algorithm
1075Project Employees IEasy25Database
1545Find Kth Bit in Nth Binary StringMedium25String, Recursion, Simulation
3517Smallest Palindromic Rearrangement IMedium25String, Sorting, Counting Sort
1661Average Time of Process per MachineEasy22Database
1141User Activity for the Past 30 Days IEasy22Database
3110Score of a StringEasy22String
511Game Play Analysis IEasy22Database
2356Number of Unique Subjects Taught by Each TeacherEasy22Database
2877Create a DataFrame from ListEasy22
610Triangle JudgementEasy22Database
1251Average Selling PriceEasy22Database
214Shortest PalindromeHard17String, Rolling Hash, String Matching, Hash Function, Manacher, Z Algorithm, Knuth–Morris–Pratt Algorithm
2620CounterEasy17
43Multiply StringsMedium17Math, String, Simulation
2011Final Value of Variable After Performing OperationsEasy17Array, String, Simulation
941Valid Mountain ArrayEasy17Array
1404Number of Steps to Reduce a Number in Binary Representation to OneMedium17String, Bit Manipulation, Simulation
2839Check if Strings Can be Made Equal With Operations IEasy17String
2942Find Words Containing CharacterEasy17Array, String
1280Students and ExaminationsEasy17Database
3838Weighted Word MappingEasy17Array, String, Simulation
1211Queries Quality and PercentageEasy17Database
1967Number of Strings That Appear as Substrings in WordEasy17Array, String
1795Rearrange Products TableEasy17Database
896Monotonic ArrayEasy17Array
3978Unique Middle ElementEasy17
3518Smallest Palindromic Rearrangement IIHard17Hash Table, Math, String, Combinatorics, Counting
596Classes With at Least 5 StudentsEasy12Database
1179Reformat Department TableEasy12Database
2715Timeout CancellationEasy12
789Escape The GhostsMedium12Array, Math
2833Furthest Point From OriginEasy12String, Counting
657Robot Return to OriginEasy12String, Simulation
3285Find Indices of Stable MountainsEasy12Array
468Validate IP AddressMedium12String
2553Separate the Digits in an ArrayEasy12Array, Simulation
2880Select DataEasy12
1050Actors and Directors Who Cooperated At Least Three TimesEasy12Database
1729Find Followers CountEasy12Database
806Number of Lines To Write StringEasy12Array, String
1791Find Center of Star GraphEasy12Graph Theory
1114Print in OrderEasy12Concurrency
1437Check If All 1's Are at Least Length K Places AwayEasy12Array
674Longest Continuous Increasing SubsequenceEasy12Array
1731The Number of Employees Which Report to Each EmployeeEasy12Database
686Repeated String MatchMedium12String, String Matching, Z Algorithm, Knuth–Morris–Pratt Algorithm, Boyer–Moore String-Search Algorithm
1920Build Array from PermutationEasy12Array, Simulation
1431Kids With the Greatest Number of CandiesEasy12Array
1528Shuffle StringEasy12Array, String

22 · Math & Bit Manipulation 72

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

Done#ProblemLevelFrequencyTopicsLinks
9Palindrome NumberEasy72Math
7Reverse IntegerMedium64Math
231Power of TwoEasy50Math, Bit Manipulation, Recursion
50Pow(x, n)Medium49Math, Recursion
2235Add Two IntegersEasy44Math
204Count PrimesMedium44Array, Math, Enumeration, Number Theory, Primality Test, Sieve Theory, Prime Number Sieve
67Add BinaryEasy43Math, String, Bit Manipulation, Simulation
136Single NumberEasy43Array, Bit Manipulation
66Plus OneEasy41Array, Math
645Set MismatchEasy39Array, Hash Table, Bit Manipulation, Sorting
29Divide Two IntegersMedium37Math, Bit Manipulation
628Maximum Product of Three NumbersEasy37Array, Math, Sorting
1922Count Good NumbersMedium33Math, Recursion
412Fizz BuzzEasy33Math, String, Simulation
1295Find Numbers with Even Number of DigitsEasy33Array, Math
137Single Number IIMedium31Array, Bit Manipulation
190Reverse BitsEasy31Divide and Conquer, Bit Manipulation
3014Minimum Number of Pushes to Type Word IEasy31Math, String, Greedy
258Add DigitsEasy28Math, Simulation, Number Theory
168Excel Sheet Column TitleEasy28Math, String
1071Greatest Common Divisor of StringsEasy28Math, String, Euclidean Algorithm, Greatest Common Divisor
1344Angle Between Hands of a ClockMedium28Math
3312Sorted GCD Pair QueriesHard28Array, Hash Table, Math, Binary Search, Combinatorics, Counting, Number Theory, Prefix Sum, Euclidean Algorithm, Greatest Common Divisor
3345Smallest Divisible Digit Product IEasy28Math, Enumeration
389Find the DifferenceEasy25Hash Table, String, Bit Manipulation, Sorting
371Sum of Two IntegersMedium25Math, Bit Manipulation
191Number of 1 BitsEasy25Divide and Conquer, Bit Manipulation
507Perfect NumberEasy25Math
3658GCD of Odd and Even SumsEasy25Math, Number Theory
415Add StringsEasy22Math, String, Simulation
1512Number of Good PairsEasy22Array, Hash Table, Math, Counting
1518Water BottlesEasy22Math, Simulation
2396Strictly Palindromic NumberMedium22Math, Two Pointers, Brainteaser
326Power of ThreeEasy22Math, Recursion
3754Concatenate Non-Zero Digits and Multiply by Sum IEasy22Math
3513Number of Unique XOR Triplets IMedium22Array, Math, Bit Manipulation
172Factorial Trailing ZeroesMedium17Math
504Base 7Easy17Math, String
868Binary GapEasy17Bit Manipulation
1356Sort Integers by The Number of 1 BitsEasy17Array, Bit Manipulation, Sorting, Counting
1009Complement of Base 10 IntegerEasy17Bit Manipulation
461Hamming DistanceEasy17Bit Manipulation
3875Construct Uniform Parity Array IEasy17Array, Math
2351First Letter to Appear TwiceEasy17Hash Table, String, Bit Manipulation, Counting
3896Minimum Operations to Transform Array into Alternating PrimeMedium17Array, Math, Two Pointers, Binary Search, Sorting, Number Theory
1154Day of the YearEasy17Math, String
3300Minimum Element After Replacement With Digit SumEasy17Array, Math
2413Smallest Even MultipleEasy17Math, Number Theory
292Nim GameEasy17Math, Brainteaser, Minimax, Game Theory, Nim Game, Impartial Game
3536Maximum Product of Two DigitsEasy17Math, Sorting
843Guess the WordHard12Array, Math, String, Minimax, Interactive, Game Theory
693Binary Number with Alternating BitsEasy12Bit Manipulation
223Rectangle AreaMedium12Math, Geometry
1523Count Odd Numbers in an Interval RangeEasy12Math
319Bulb SwitcherMedium12Math, Brainteaser
762Prime Number of Set Bits in Binary RepresentationEasy12Math, Bit Manipulation, Primality Test
1680Concatenation of Consecutive Binary NumbersMedium12Math, Bit Manipulation, Simulation
260Single Number IIIMedium12Array, Bit Manipulation
3894Traffic Signal ColorEasy12Math, String, Simulation
3783Mirror Distance of an IntegerEasy12Math
1281Subtract the Product and Sum of Digits of an IntegerEasy12Math
2520Count the Digits That Divide a NumberEasy12Math
866Prime PalindromeMedium12Math, Number Theory, Primality Test
1979Find Greatest Common Divisor of ArrayEasy12Array, Math, Number Theory, Euclidean Algorithm, Greatest Common Divisor
754Reach a NumberMedium12Math, Binary Search
1684Count the Number of Consistent StringsEasy12Array, Hash Table, String, Bit Manipulation, Counting
372Super PowMedium12Math, Divide and Conquer, Euler's Totient Function, Euler's Theorem
2600K Items With the Maximum SumEasy12Math, Greedy
1318Minimum Flips to Make a OR b Equal to cMedium12Bit Manipulation
263Ugly NumberEasy12Math
1492The kth Factor of nMedium12Math, Number Theory, Prime Factorization
3702Longest Subsequence With Non-Zero Bitwise XORMedium12Array, Bit Manipulation

23 · Union-Find (Disjoint Set Union) 10

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

Done#ProblemLevelFrequencyTopicsLinks
721Accounts MergeMedium25Array, Hash Table, String, Depth-First Search, Breadth-First Search, Union-Find, Sorting
1101The Earliest Moment When Everyone Become Friends PremiumMedium25Array, Union-Find, Sorting
1722Minimize Hamming Distance After Swap OperationsMedium25Array, Depth-First Search, Union-Find
3532Path Existence Queries in a Graph IMedium25Array, Hash Table, Binary Search, Union-Find, Graph Theory
3534Path Existence Queries in a Graph IIHard25Array, Two Pointers, Binary Search, Dynamic Programming, Greedy, Bit Manipulation, Graph Theory, Sorting
2492Minimum Score of a Path Between Two CitiesMedium22Depth-First Search, Breadth-First Search, Union-Find, Graph Theory
305Number of Islands II PremiumHard17Array, Hash Table, Union-Find
947Most Stones Removed with Same Row or ColumnMedium12Hash Table, Depth-First Search, Union-Find, Graph Theory, Bipartite Graph
1970Last Day Where You Can Still CrossHard12Array, Binary Search, Depth-First Search, Breadth-First Search, Union-Find, Matrix
827Making A Large IslandHard12Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix

24 · Segment Tree & Fenwick Tree 11

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

Done#ProblemLevelFrequencyTopicsLinks
493Reverse PairsHard31Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set, Treap
3161Block Placement QueriesHard28Array, Binary Search, Binary Indexed Tree, Segment Tree, Ordered Set
315Count of Smaller Numbers After SelfHard25Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set, Treap
3501Maximize Active Section with Trade IIHard22Array, String, Binary Search, Segment Tree
307Range Sum Query - MutableMedium17Array, Divide and Conquer, Design, Binary Indexed Tree, Segment Tree, Sqrt Decomposition
2213Longest Substring of One Repeating CharacterHard17Array, String, Segment Tree, Ordered Set
3691Maximum Total Subarray Value IIHard12Array, Greedy, Segment Tree, Heap (Priority Queue)
2913Subarrays Distinct Element Sum of Squares IEasy12Array, Hash Table, Segment Tree
327Count of Range SumHard12Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set, Treap
2407Longest Increasing Subsequence IIHard12Array, Divide and Conquer, Dynamic Programming, Binary Indexed Tree, Segment Tree, Queue, Monotonic Queue
3479Fruits Into Baskets IIIMedium12Array, Binary Search, 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.