InterviewKata
Interview preparation

Microsoft interview problems, by pattern

All 411 problems from Microsoft's six-month LeetCode list (131 Easy, 218 Medium, 62 Hard), grouped by the pattern that solves them. 319 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 Microsoft 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 (17)
02 · Two Pointers (26)
03 · Sliding Window (22)
04 · Fast & Slow Pointers (10)
05 · LinkedList In-place Reversal (13)
21 · Array & String Basics (40)
128
Month 2Stacks, heaps, intervals, binary search06 · Monotonic Stack (9)
07 · Top 'K' Elements (15)
08 · Overlapping Intervals (9)
09 · Modified Binary Search (21)
17 · Stack (11)
65
Month 3Trees and graphs10 · Binary Tree Traversal (31)
11 · Depth-First Search (DFS) on Graphs (9)
12 · Breadth-First Search (BFS) (10)
13 · Matrix Traversal (9)
23 · Union-Find (Disjoint Set Union) (5)
64
Month 4Search and dynamic programming14 · Backtracking (17)
15 · Dynamic Programming Patterns (51)
68
Month 5Hashing, greedy, design, weighted graphs16 · Hash Map & Set (17)
18 · Greedy (24)
19 · Trie & Design (4)
20 · Shortest Path & MST (1)
46
Month 6Math, range structures, then mock interviews22 · Math & Bit Manipulation (31)
24 · Segment Tree & Fenwick Tree (2)
33

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 17

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

Done#ProblemLevelFrequencyTopicsLinks
560Subarray Sum Equals KMedium70Array, Hash Table, Prefix Sum
238Product of Array Except SelfMedium50Array, Prefix Sum
525Contiguous ArrayMedium32Array, Hash Table, Prefix Sum
930Binary Subarrays With SumMedium32Array, Hash Table, Sliding Window, Prefix Sum
3737Count Subarrays With Majority Element IMedium32Array, Hash Table, Divide and Conquer, Segment Tree, Merge Sort, Counting, Prefix Sum
1480Running Sum of 1d ArrayEasy32Array, Prefix Sum
974Subarray Sums Divisible by KMedium24Array, Hash Table, Prefix Sum
523Continuous Subarray SumMedium24Array, Hash Table, Math, Prefix Sum, Pigeonhole Principle
3546Equal Sum Grid Partition IMedium24Array, Matrix, Enumeration, Prefix Sum
2906Construct Product MatrixMedium24Array, Matrix, Prefix Sum
1674Minimum Moves to Make Array ComplementaryMedium24Array, Hash Table, Prefix Sum
303Range Sum Query - ImmutableEasy24Array, Design, Prefix Sum
3699Number of ZigZag Arrays IHard24Dynamic Programming, Prefix Sum
1732Find the Highest AltitudeEasy24Array, Prefix Sum
862Shortest Subarray with Sum at Least KHard24Array, Binary Search, Queue, Sliding Window, Heap (Priority Queue), Prefix Sum, Monotonic Queue
1109Corporate Flight BookingsMedium24Array, Prefix Sum
2381Shifting Letters IIMedium24Array, String, Prefix Sum

02 · Two Pointers 26

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

Done#ProblemLevelFrequencyTopicsLinks
5Longest Palindromic SubstringMedium79Two Pointers, String, Dynamic Programming, Manacher
42Trapping Rain WaterHard74Array, Two Pointers, Dynamic Programming, Stack, Monotonic Stack
153SumMedium73Array, Two Pointers, Sorting
31Next PermutationMedium67Array, Two Pointers
11Container With Most WaterMedium66Array, Two Pointers, Greedy
26Remove Duplicates from Sorted ArrayEasy61Array, Two Pointers
4Median of Two Sorted ArraysHard57Array, Binary Search, Divide and Conquer
88Merge Sorted ArrayEasy55Array, Two Pointers, Sorting
125Valid PalindromeEasy55Two Pointers, String
189Rotate ArrayMedium52Array, Math, Two Pointers
283Move ZeroesEasy52Array, Two Pointers
75Sort ColorsMedium50Array, Two Pointers, Sorting, Quicksort, Bubble Sort
344Reverse StringEasy46Two Pointers, String
163Sum ClosestMedium46Array, Two Pointers, Sorting
167Two Sum II - Input Array Is SortedMedium42Array, Two Pointers, Binary Search
1768Merge Strings AlternatelyEasy38Two Pointers, String
184SumMedium38Array, Two Pointers, Sorting
680Valid Palindrome IIEasy38Two Pointers, String, Greedy
27Remove ElementEasy32Array, Two Pointers
653Two Sum IV - Input is a BSTEasy32Hash Table, Two Pointers, Tree, Depth-First Search, Breadth-First Search, Binary Search Tree, Binary Tree
443String CompressionMedium32Two Pointers, String
2161Partition Array According to Given PivotMedium32Array, Two Pointers, Simulation
345Reverse Vowels of a StringEasy32Two Pointers, String
392Is SubsequenceEasy24Two Pointers, String, Dynamic Programming
160Intersection of Two Linked ListsEasy24Hash Table, Linked List, Two Pointers
696Count Binary SubstringsEasy24Two Pointers, String

03 · Sliding Window 22

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

Done#ProblemLevelFrequencyTopicsLinks
3Longest Substring Without Repeating CharactersMedium76Hash Table, String, Sliding Window
121Best Time to Buy and Sell StockEasy67Array, Dynamic Programming
76Minimum Window SubstringHard64Hash Table, String, Sliding Window
239Sliding Window MaximumHard57Array, Queue, Sliding Window, Heap (Priority Queue), Monotonic Queue, Range Minimum/Maximum Query
643Maximum Average Subarray IEasy57Array, Sliding Window
424Longest Repeating Character ReplacementMedium52Hash Table, String, Sliding Window
209Minimum Size Subarray SumMedium50Array, Binary Search, Sliding Window, Prefix Sum
1838Frequency of the Most Frequent ElementMedium42Array, Binary Search, Greedy, Sliding Window, Sorting, Prefix Sum
1004Max Consecutive Ones IIIMedium42Array, Binary Search, Sliding Window, Prefix Sum
438Find All Anagrams in a StringMedium38Hash Table, String, Sliding Window
1358Number of Substrings Containing All Three CharactersMedium38Hash Table, String, Sliding Window
219Contains Duplicate IIEasy38Array, Hash Table, Sliding Window
992Subarrays with K Different IntegersHard32Array, Hash Table, Sliding Window, Counting
30Substring with Concatenation of All WordsHard32Hash Table, String, Sliding Window
1888Minimum Number of Flips to Make the Binary String AlternatingMedium32String, Dynamic Programming, Sliding Window
567Permutation in StringMedium32Hash Table, Two Pointers, String, Sliding Window
1423Maximum Points You Can Obtain from CardsMedium24Array, Sliding Window, Prefix Sum
1461Check If a String Contains All Binary Codes of Size KMedium24Hash Table, String, Bit Manipulation, Rolling Hash, Hash Function, Directed Acyclic Graph
1456Maximum Number of Vowels in a Substring of Given LengthMedium24String, Sliding Window
1208Get Equal Substrings Within BudgetMedium24String, Binary Search, Sliding Window, Prefix Sum
187Repeated DNA SequencesMedium24Hash Table, String, Bit Manipulation, Sliding Window, Rolling Hash, Hash Function, Z Algorithm, Boyer–Moore String-Search Algorithm
1343Number of Sub-arrays of Size K and Average Greater than or Equal to ThresholdMedium24Array, Sliding Window

04 · Fast & Slow Pointers 10

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

Done#ProblemLevelFrequencyTopicsLinks
143Reorder ListMedium52Linked List, Two Pointers, Stack, Recursion
202Happy NumberEasy50Hash Table, Math, Two Pointers, Floyd's Cycle Finding Algorithm
234Palindrome Linked ListEasy38Linked List, Two Pointers, Stack, Recursion
876Middle of the Linked ListEasy38Linked List, Two Pointers
287Find the Duplicate NumberMedium38Array, Two Pointers, Binary Search, Bit Manipulation, Pigeonhole Principle, Floyd's Cycle Finding Algorithm
141Linked List CycleEasy38Hash Table, Linked List, Two Pointers, Floyd's Cycle Finding Algorithm
142Linked List Cycle IIMedium32Hash Table, Linked List, Two Pointers, Floyd's Cycle Finding Algorithm
41First Missing PositiveHard24Array, Hash Table
19Remove Nth Node From End of ListMedium24Linked List, Two Pointers
2095Delete the Middle Node of a Linked ListMedium24Linked List, Two Pointers

05 · LinkedList In-place Reversal 13

11 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 ListsEasy52Linked List, Recursion
138Copy List with Random PointerMedium52Hash Table, Linked List
206Reverse Linked ListEasy50Linked List, Recursion
25Reverse Nodes in k-GroupHard42Linked List, Recursion
61Rotate ListMedium42Linked List, Two Pointers
92Reverse Linked List IIMedium38Linked List
83Remove Duplicates from Sorted ListEasy38Linked List
237Delete Node in a Linked ListMedium32Linked List
706Design HashMapEasy24Array, Hash Table, Linked List, Design, Hash Function
24Swap Nodes in PairsMedium24Linked List, Recursion
203Remove Linked List ElementsEasy24Linked List, Recursion
86Partition ListMedium24Linked List, Two Pointers

06 · Monotonic Stack 9

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

Done#ProblemLevelFrequencyTopicsLinks
1475Final Prices With a Special Discount in a ShopEasy57Array, Stack, Monotonic Stack
84Largest Rectangle in HistogramHard46Array, Stack, Monotonic Stack, Range Minimum/Maximum Query
496Next Greater Element IEasy46Array, Hash Table, Stack, Monotonic Stack
85Maximal RectangleHard46Array, Dynamic Programming, Stack, Matrix, Monotonic Stack
739Daily TemperaturesMedium42Array, Stack, Monotonic Stack
907Sum of Subarray MinimumsMedium32Array, Dynamic Programming, Stack, Monotonic Stack
503Next Greater Element IIMedium32Array, Stack, Monotonic Stack
1696Jump Game VIMedium24Array, Dynamic Programming, Queue, Heap (Priority Queue), Monotonic Queue
402Remove K DigitsMedium24String, Stack, Greedy, Monotonic Stack

07 · Top 'K' Elements 15

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

Done#ProblemLevelFrequencyTopicsLinks
23Merge k Sorted ListsHard55Linked List, Divide and Conquer, Heap (Priority Queue), Merge Sort, Tournament Sort
295Find Median from Data StreamHard46Two Pointers, Design, Sorting, Heap (Priority Queue), Data Stream
347Top K Frequent ElementsMedium46Array, Hash Table, Divide and Conquer, Sorting, Heap (Priority Queue), Bucket Sort, Counting, Quickselect
621Task SchedulerMedium42Array, Hash Table, Greedy, Sorting, Heap (Priority Queue), Counting
1353Maximum Number of Events That Can Be AttendedMedium42Array, Greedy, Sorting, Heap (Priority Queue)
215Kth Largest Element in an ArrayMedium38Array, Divide and Conquer, Sorting, Heap (Priority Queue), Quickselect
451Sort Characters By FrequencyMedium38Hash Table, String, Sorting, Heap (Priority Queue), Bucket Sort, Counting
373Find K Pairs with Smallest SumsMedium32Array, Heap (Priority Queue)
658Find K Closest ElementsMedium24Array, Two Pointers, Binary Search, Sliding Window, Sorting, Heap (Priority Queue)
632Smallest Range Covering Elements from K ListsHard24Array, Hash Table, Greedy, Sliding Window, Sorting, Heap (Priority Queue)
703Kth Largest Element in a StreamEasy24Tree, Design, Binary Search Tree, Heap (Priority Queue), Binary Tree, Data Stream
264Ugly Number IIMedium24Hash Table, Math, Dynamic Programming, Heap (Priority Queue)
1046Last Stone WeightEasy24Array, Heap (Priority Queue)
2402Meeting Rooms IIIHard24Array, Hash Table, Sorting, Heap (Priority Queue), Simulation
1464Maximum Product of Two Elements in an ArrayEasy24Array, Sorting, Heap (Priority Queue)

08 · Overlapping Intervals 9

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

Done#ProblemLevelFrequencyTopicsLinks
56Merge IntervalsMedium70Array, Sorting, Quicksort
253Meeting Rooms II PremiumMedium52Array, Two Pointers, Greedy, Sorting, Heap (Priority Queue), Prefix Sum
435Non-overlapping IntervalsMedium38Array, Dynamic Programming, Greedy, Sorting
986Interval List IntersectionsMedium32Array, Two Pointers, Sweep Line
763Partition LabelsMedium32Hash Table, Two Pointers, String, Greedy
1288Remove Covered IntervalsMedium32Array, Sorting
57Insert IntervalMedium24Array
2021Brightest Position on Street PremiumMedium24Array, Sorting, Prefix Sum, Ordered Set
218The Skyline ProblemHard24Array, Divide and Conquer, Binary Indexed Tree, Segment Tree, Sweep Line, Sorting, Heap (Priority Queue), Ordered Set

09 · Modified Binary Search 21

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

Done#ProblemLevelFrequencyTopicsLinks
33Search in Rotated Sorted ArrayMedium62Array, Binary Search
875Koko Eating BananasMedium57Array, Binary Search
74Search a 2D MatrixMedium52Array, Binary Search, Matrix
540Single Element in a Sorted ArrayMedium50Array, Binary Search
704Binary SearchEasy50Array, Binary Search
35Search Insert PositionEasy46Array, Binary Search
1011Capacity To Ship Packages Within D DaysMedium42Array, Binary Search
475HeatersMedium42Array, Two Pointers, Binary Search, Sorting
162Find Peak ElementMedium38Array, Binary Search
349Intersection of Two ArraysEasy38Array, Hash Table, Two Pointers, Binary Search, Sorting
410Split Array Largest SumHard38Array, Binary Search, Dynamic Programming, Greedy, Prefix Sum
1283Find the Smallest Divisor Given a ThresholdMedium38Array, Binary Search
34Find First and Last Position of Element in Sorted ArrayMedium32Array, Binary Search
69Sqrt(x)Easy32Math, Binary Search, Newton's Method
268Missing NumberEasy32Array, Hash Table, Math, Binary Search, Bit Manipulation, Sorting
240Search a 2D Matrix IIMedium32Array, Binary Search, Divide and Conquer, Matrix
1552Magnetic Force Between Two BallsMedium24Array, Binary Search, Sorting
278First Bad VersionEasy24Binary Search, Interactive
2080Range Frequency QueriesMedium24Array, Hash Table, Binary Search, Design, Segment Tree
1235Maximum Profit in Job SchedulingHard24Array, Binary Search, Dynamic Programming, Sorting
81Search in Rotated Sorted Array IIMedium24Array, Binary Search

10 · Binary Tree Traversal 31

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

Done#ProblemLevelFrequencyTopicsLinks
297Serialize and Deserialize Binary TreeHard52String, Tree, Depth-First Search, Breadth-First Search, Design, Binary Tree
105Construct Binary Tree from Preorder and Inorder TraversalMedium50Array, Hash Table, Divide and Conquer, Tree, Binary Tree
543Diameter of Binary TreeEasy46Tree, Depth-First Search, Binary Tree, DP on Trees
987Vertical Order Traversal of a Binary TreeHard46Hash Table, Tree, Depth-First Search, Breadth-First Search, Sorting, Binary Tree
98Validate Binary Search TreeMedium42Tree, Depth-First Search, Binary Search Tree, Binary Tree
104Maximum Depth of Binary TreeEasy42Tree, Depth-First Search, Breadth-First Search, Binary Tree
101Symmetric TreeEasy42Tree, Depth-First Search, Breadth-First Search, Binary Tree
110Balanced Binary TreeEasy42Tree, Depth-First Search, Binary Tree
100Same TreeEasy38Tree, Depth-First Search, Breadth-First Search, Binary Tree
124Binary Tree Maximum Path SumHard38Dynamic Programming, Tree, Depth-First Search, Binary Tree, DP on Trees
103Binary Tree Zigzag Level Order TraversalMedium32Tree, Breadth-First Search, Binary Tree
102Binary Tree Level Order TraversalMedium32Tree, Breadth-First Search, Binary Tree
235Lowest Common Ancestor of a Binary Search TreeMedium32Tree, Depth-First Search, Binary Search Tree, Binary Tree, Binary Lifting, Lowest Common Ancestor
199Binary Tree Right Side ViewMedium32Tree, Depth-First Search, Breadth-First Search, Binary Tree
230Kth Smallest Element in a BSTMedium32Tree, Depth-First Search, Binary Search Tree, Binary Tree
2385Amount of Time for Binary Tree to Be InfectedMedium32Hash Table, Tree, Depth-First Search, Breadth-First Search, Binary Tree
173Binary Search Tree IteratorMedium32Stack, Tree, Design, Binary Search Tree, Binary Tree, Iterator
113Path Sum IIMedium32Backtracking, Tree, Depth-First Search, Binary Tree
226Invert Binary TreeEasy32Tree, Depth-First Search, Breadth-First Search, Binary Tree
545Boundary of Binary Tree PremiumMedium24Tree, Depth-First Search, Binary Tree
114Flatten Binary Tree to Linked ListMedium24Linked List, Stack, Tree, Depth-First Search, Binary Tree
404Sum of Left LeavesEasy24Tree, Depth-First Search, Breadth-First Search, Binary Tree
1932Merge BSTs to Create Single BSTHard24Array, Hash Table, Tree, Depth-First Search, Binary Search Tree, Binary Tree
428Serialize and Deserialize N-ary Tree PremiumHard24String, Tree, Depth-First Search, Breadth-First Search
108Convert Sorted Array to Binary Search TreeEasy24Array, Divide and Conquer, Tree, Binary Search Tree, Binary Tree
144Binary Tree Preorder TraversalEasy24Stack, Tree, Depth-First Search, Binary Tree
95Unique Binary Search Trees IIMedium24Dynamic Programming, Backtracking, Tree, Binary Search Tree, Binary Tree
2791Count Paths That Can Form a Palindrome in a TreeHard24Hash Table, Bit Manipulation, Tree, Depth-First Search
96Unique Binary Search TreesMedium24Math, Dynamic Programming, Tree, Binary Search Tree, Binary Tree
700Search in a Binary Search TreeEasy24Tree, Binary Search Tree, Binary Tree
337House Robber IIIMedium24Dynamic Programming, Tree, Depth-First Search, Binary Tree, DP on Trees

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

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

Done#ProblemLevelFrequencyTopicsLinks
2858Minimum Edge Reversals So Every Node Is ReachableHard59Dynamic Programming, Depth-First Search, Breadth-First Search, Graph Theory
207Course ScheduleMedium32Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort, Directed Acyclic Graph
210Course Schedule IIMedium32Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort
399Evaluate DivisionMedium32Array, String, Depth-First Search, Breadth-First Search, Union-Find, Graph Theory, Shortest Path, Bellman–Ford Algorithm, Floyd–Warshall Algorithm
329Longest Increasing Path in a MatrixHard32Array, Dynamic Programming, Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort, Memoization, Matrix, Directed Acyclic Graph
1971Find if Path Exists in GraphEasy24Depth-First Search, Breadth-First Search, Union-Find, Graph Theory
2050Parallel Courses IIIHard24Array, Dynamic Programming, Graph Theory, Topological Sort, Directed Acyclic Graph
802Find Eventual Safe StatesMedium24Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort, Kosaraju's Algorithm, Tarjan's SCC Algorithm
785Is Graph Bipartite?Medium24Depth-First Search, Breadth-First Search, Union-Find, Graph Theory, Graph Coloring, Bipartite Graph

12 · Breadth-First Search (BFS) 10

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

Done#ProblemLevelFrequencyTopicsLinks
994Rotting OrangesMedium57Array, Breadth-First Search, Matrix
863All Nodes Distance K in Binary TreeMedium46Hash Table, Tree, Depth-First Search, Breadth-First Search, Binary Tree
1091Shortest Path in Binary MatrixMedium32Array, Breadth-First Search, Matrix
752Open the LockMedium24Array, Hash Table, String, Breadth-First Search, Bidirectional Search
310Minimum Height TreesMedium24Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort
54201 MatrixMedium24Array, Dynamic Programming, Breadth-First Search, Matrix
847Shortest Path Visiting All NodesHard24Dynamic Programming, Bit Manipulation, Breadth-First Search, Graph Theory, Bitmask
1236Web Crawler PremiumMedium24String, Depth-First Search, Breadth-First Search, Interactive
117Populating Next Right Pointers in Each Node IIMedium24Linked List, Tree, Depth-First Search, Breadth-First Search, Binary Tree
126Word Ladder IIHard24Hash Table, String, Backtracking, Breadth-First Search, Bidirectional Search

13 · Matrix Traversal 9

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

Done#ProblemLevelFrequencyTopicsLinks
200Number of IslandsMedium70Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix
48Rotate ImageMedium52Array, Math, Matrix
54Spiral MatrixMedium46Array, Matrix, Simulation
73Set Matrix ZeroesMedium46Array, Hash Table, Matrix
130Surrounded RegionsMedium42Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix
733Flood FillEasy38Array, Depth-First Search, Breadth-First Search, Matrix
407Trapping Rain Water IIHard24Array, Breadth-First Search, Heap (Priority Queue), Matrix
417Pacific Atlantic Water FlowMedium24Array, Depth-First Search, Breadth-First Search, Matrix
498Diagonal TraverseMedium24Array, Matrix, Simulation

14 · Backtracking 17

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

Done#ProblemLevelFrequencyTopicsLinks
22Generate ParenthesesMedium64String, Dynamic Programming, Backtracking, Bracket Sequences
17Letter Combinations of a Phone NumberMedium57Hash Table, String, Backtracking
51N-QueensHard55Array, Backtracking, Algorithm X
78SubsetsMedium52Array, Backtracking, Bit Manipulation
46PermutationsMedium46Array, Backtracking
79Word SearchMedium42Array, String, Backtracking, Depth-First Search, Matrix
90Subsets IIMedium42Array, Backtracking, Bit Manipulation
216Combination Sum IIIMedium38Array, Backtracking
526Beautiful ArrangementMedium38Array, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask
93Restore IP AddressesMedium32String, Backtracking
131Palindrome PartitioningMedium32String, Dynamic Programming, Backtracking
698Partition to K Equal Sum SubsetsMedium32Array, Dynamic Programming, Backtracking, Bit Manipulation, Memoization, Bitmask
140Word Break IIHard32Array, Hash Table, String, Dynamic Programming, Backtracking, Trie, Memoization
39Combination SumMedium32Array, Backtracking
1980Find Unique Binary StringMedium24Array, Hash Table, String, Backtracking
257Binary Tree PathsEasy24String, Backtracking, Tree, Depth-First Search, Binary Tree
401Binary WatchEasy24Backtracking, Bit Manipulation

15 · Dynamic Programming Patterns 51

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

Done#ProblemLevelFrequencyTopicsLinks
53Maximum SubarrayMedium73Array, Divide and Conquer, Dynamic Programming
70Climbing StairsEasy57Math, Dynamic Programming, Memoization
509Fibonacci NumberEasy57Math, Dynamic Programming, Recursion, Memoization
198House RobberMedium55Array, Dynamic Programming
300Longest Increasing SubsequenceMedium52Array, Binary Search, Dynamic Programming, Longest Increasing Subsequence
322Coin ChangeMedium50Array, Dynamic Programming, Breadth-First Search, Knapsack Problem, Complete Knapsack
62Unique PathsMedium50Math, Dynamic Programming, Combinatorics
118Pascal's TriangleEasy46Array, Dynamic Programming
139Word BreakMedium42Array, Hash Table, String, Dynamic Programming, Trie, Memoization, Brute-Force Search
44Wildcard MatchingHard42String, Dynamic Programming, Greedy, Recursion
312Burst BalloonsHard42Array, Dynamic Programming
1143Longest Common SubsequenceMedium42String, Dynamic Programming, Longest Common Subsequence
72Edit DistanceMedium38String, Dynamic Programming
32Longest Valid ParenthesesHard38String, Dynamic Programming, Stack, Bracket Sequences
1547Minimum Cost to Cut a StickHard38Array, Dynamic Programming, Sorting
10Regular Expression MatchingHard32String, Dynamic Programming, Recursion
64Minimum Path SumMedium32Array, Dynamic Programming, Matrix
1335Minimum Difficulty of a Job ScheduleHard32Array, Dynamic Programming
2472Maximum Number of Non-overlapping Palindrome SubstringsHard32Two Pointers, String, Dynamic Programming, Greedy
647Palindromic SubstringsMedium32Two Pointers, String, Dynamic Programming
91Decode WaysMedium32String, Dynamic Programming
516Longest Palindromic SubsequenceMedium32String, Dynamic Programming
1594Maximum Non Negative Product in a MatrixMedium32Array, Dynamic Programming, Matrix
518Coin Change IIMedium32Array, Dynamic Programming, Knapsack Problem, Complete Knapsack
233Number of Digit OneHard32Math, Dynamic Programming, Recursion
2484Count Palindromic SubsequencesHard32String, Dynamic Programming
837New 21 GameMedium32Math, Dynamic Programming, Sliding Window, Probability and Statistics
486Predict the WinnerMedium32Array, Math, Dynamic Programming, Recursion, Minimax, Game Theory, Zero-Sum Game
877Stone GameMedium32Array, Math, Dynamic Programming, Minimax, Game Theory, Zero-Sum Game
132Palindrome Partitioning IIHard24String, Dynamic Programming
115Distinct SubsequencesHard24String, Dynamic Programming
2977Minimum Cost to Convert String IIHard24Array, String, Dynamic Programming, Graph Theory, Trie, Shortest Path
3418Maximum Amount of Money Robot Can EarnMedium24Array, Dynamic Programming, Matrix
3742Maximum Path Score in a GridMedium24Array, Dynamic Programming, Matrix
3946Maximum Number of Items From Sale IMedium24Array, Dynamic Programming, Greedy
1000Minimum Cost to Merge StonesHard24Array, Dynamic Programming, Prefix Sum
3753Total Waviness of Numbers in Range IIHard24Math, Dynamic Programming
120TriangleMedium24Array, Dynamic Programming
416Partition Equal Subset SumMedium24Array, Dynamic Programming, Knapsack Problem, 0-1 Knapsack
188Best Time to Buy and Sell Stock IVHard24Array, Dynamic Programming
740Delete and EarnMedium24Array, Hash Table, Dynamic Programming
3336Find the Number of Subsequences With Equal GCDHard24Array, Math, Dynamic Programming, Number Theory, Euclidean Algorithm, Greatest Common Divisor
918Maximum Sum Circular SubarrayMedium24Array, Divide and Conquer, Dynamic Programming, Queue, Monotonic Queue
343Integer BreakMedium24Math, Dynamic Programming
279Perfect SquaresMedium24Math, Dynamic Programming, Breadth-First Search, Knapsack Problem, Complete Knapsack
368Largest Divisible SubsetMedium24Array, Math, Dynamic Programming, Sorting
1140Stone Game IIMedium24Array, Math, Dynamic Programming, Minimax, Prefix Sum, Game Theory, Zero-Sum Game
464Can I WinMedium24Math, Dynamic Programming, Bit Manipulation, Memoization, Game Theory, Bitmask
494Target SumMedium24Array, Dynamic Programming, Backtracking, Knapsack Problem, 0-1 Knapsack
63Unique Paths IIMedium24Array, Dynamic Programming, Matrix
357Count Numbers with Unique DigitsMedium24Math, Dynamic Programming, Backtracking

16 · Hash Map & Set 17

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

Done#ProblemLevelFrequencyTopicsLinks
1Two SumEasy100Array, Hash Table
242Valid AnagramEasy62Hash Table, String, Sorting
128Longest Consecutive SequenceMedium57Array, Hash Table, Union-Find
169Majority ElementEasy55Array, Hash Table, Divide and Conquer, Sorting, Counting, Boyer–Moore Majority Vote Algorithm
217Contains DuplicateEasy55Array, Hash Table, Sorting
49Group AnagramsMedium46Array, Hash Table, String, Sorting
383Ransom NoteEasy38Hash Table, String, Counting
387First Unique Character in a StringEasy32Hash Table, String, Queue, Counting
205Isomorphic StringsEasy32Hash Table, String
448Find All Numbers Disappeared in an ArrayEasy32Array, Hash Table
229Majority Element IIMedium32Array, Hash Table, Sorting, Counting, Boyer–Moore Majority Vote Algorithm
36Valid SudokuMedium32Array, Hash Table, Matrix
2840Check if Strings Can be Made Equal With Operations IIMedium24Hash Table, String, Sorting
3741Minimum Distance Between Three Equal Elements IIMedium24Array, Hash Table
3761Minimum Absolute Distance Between Mirror PairsMedium24Array, Hash Table, Math
929Unique Email AddressesEasy24Array, Hash Table, String
290Word PatternEasy24Hash Table, String

17 · Stack 11

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

Done#ProblemLevelFrequencyTopicsLinks
20Valid ParenthesesEasy61String, Stack, Bracket Sequences
155Min StackMedium50Stack, Design
224Basic CalculatorHard50Math, String, Stack, Recursion
232Implement Queue using StacksEasy42Stack, Design, Queue
678Valid Parenthesis StringMedium32String, Dynamic Programming, Stack, Greedy, Bracket Sequences
622Design Circular QueueMedium32Array, Linked List, Design, Queue
735Asteroid CollisionMedium32Array, Stack, Simulation
1441Build an Array With Stack OperationsMedium24Array, Stack, Simulation
1021Remove Outermost ParenthesesEasy24String, Stack, Bracket Sequences
71Simplify PathMedium24String, Stack
1544Make The String GreatEasy24String, Stack

18 · Greedy 24

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

Done#ProblemLevelFrequencyTopicsLinks
45Jump Game IIMedium46Array, Dynamic Programming, Greedy
55Jump GameMedium42Array, Dynamic Programming, Greedy
179Largest NumberMedium42Array, String, Greedy, Sorting
122Best Time to Buy and Sell Stock IIMedium38Array, Dynamic Programming, Greedy
334Increasing Triplet SubsequenceMedium38Array, Greedy, Longest Increasing Subsequence
274H-IndexMedium32Array, Sorting, Counting Sort
134Gas StationMedium32Array, Greedy
605Can Place FlowersEasy32Array, Greedy
135CandyHard24Array, Greedy
761Special Binary StringHard24String, Divide and Conquer, Sorting
1365How Many Numbers Are Smaller Than the Current NumberEasy24Array, Hash Table, Sorting, Counting Sort
747Largest Number At Least Twice of OthersEasy24Array, Sorting
1727Largest Submatrix With RearrangementsMedium24Array, Greedy, Sorting, Matrix
1710Maximum Units on a TruckEasy24Array, Greedy, Sorting
2784Check if Array is GoodEasy24Array, Hash Table, Sorting
2418Sort the PeopleEasy24Array, Hash Table, String, Sorting
1840Maximum Building HeightHard24Array, Math, Sorting
3499Maximize Active Section with Trade IMedium24String, Enumeration
1013Partition Array Into Three Parts With Equal SumEasy24Array, Greedy
2126Destroying AsteroidsMedium24Array, Greedy, Sorting
2680Maximum ORMedium24Array, Greedy, Bit Manipulation, Prefix Sum
912Sort an ArrayMedium24Array, Divide and Conquer, Sorting, Heap (Priority Queue), Merge Sort, Bucket Sort, Radix Sort, Counting Sort
860Lemonade ChangeEasy24Array, Greedy
1665Minimum Initial Energy to Finish TasksHard24Array, Greedy, Sorting

19 · Trie & Design 4

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

Done#ProblemLevelFrequencyTopicsLinks
146LRU CacheMedium70Hash Table, Linked List, Design, Doubly-Linked List
208Implement Trie (Prefix Tree)Medium38Hash Table, String, Design, Trie
460LFU CacheHard32Hash Table, Linked List, Design, Doubly-Linked List
380Insert Delete GetRandom O(1)Medium24Array, Hash Table, Math, Design, Randomized

20 · Shortest Path & MST 1

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

Done#ProblemLevelFrequencyTopicsLinks
1928Minimum Cost to Reach Destination in TimeHard32Array, Dynamic Programming, Graph Theory, Dijkstra's Algorithm

21 · Array & String Basics 40

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

Done#ProblemLevelFrequencyTopicsLinks
14Longest Common PrefixEasy62Array, String, Trie
13Roman to IntegerEasy55Hash Table, Math, String
6Zigzag ConversionMedium52String
1929Concatenation of ArrayEasy50Array, Simulation
12Integer to RomanMedium46Hash Table, Math, String
28Find the Index of the First Occurrence in a StringEasy46Two Pointers, String, String Matching, Z Algorithm, Knuth–Morris–Pratt Algorithm, Boyer–Moore String-Search Algorithm
175Combine Two TablesEasy42Database
2667Create Hello World FunctionEasy42
8String to Integer (atoi)Medium38String
485Max Consecutive OnesEasy38Array
273Integer to English WordsHard38Math, String, Recursion
58Length of Last WordEasy38String
796Rotate StringEasy38String, String Matching
584Find Customer RefereeEasy38Database
1280Students and ExaminationsEasy38Database
1757Recyclable and Low Fat ProductsEasy32Database
1752Check if Array Is Sorted and RotatedEasy32Array
1251Average Selling PriceEasy32Database
657Robot Return to OriginEasy32String, Simulation
586Customer Placing the Largest Number of OrdersEasy32Database
181Employees Earning More Than Their ManagersEasy32Database
193Valid Phone NumbersEasy32Shell
151Reverse Words in a StringMedium24Two Pointers, String
1148Article Views IEasy24Database
197Rising TemperatureEasy24Database
577Employee BonusEasy24Database
182Duplicate EmailsEasy24Database
196Delete Duplicate EmailsEasy24Database
2553Separate the Digits in an ArrayEasy24Array, Simulation
1431Kids With the Greatest Number of CandiesEasy24Array
620Not Boring MoviesEasy24Database
2621SleepEasy24
1287Element Appearing More Than 25% In Sorted ArrayEasy24Array
1378Replace Employee ID With The Unique IdentifierEasy24Database
1789Primary Department for Each EmployeeEasy24Database
183Customers Who Never OrderEasy24Database
619Biggest Single NumberEasy24Database
610Triangle JudgementEasy24Database
2877Create a DataFrame from ListEasy24
1392Longest Happy PrefixHard24String, Rolling Hash, String Matching, Hash Function, Z Algorithm, Knuth–Morris–Pratt Algorithm

22 · Math & Bit Manipulation 31

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

Done#ProblemLevelFrequencyTopicsLinks
9Palindrome NumberEasy57Math
7Reverse IntegerMedium55Math
67Add BinaryEasy46Math, String, Bit Manipulation, Simulation
137Single Number IIMedium42Array, Bit Manipulation
204Count PrimesMedium42Array, Math, Enumeration, Number Theory, Primality Test, Sieve Theory, Prime Number Sieve
136Single NumberEasy42Array, Bit Manipulation
50Pow(x, n)Medium38Math, Recursion
66Plus OneEasy38Array, Math
2571Minimum Operations to Reduce an Integer to 0Medium38Dynamic Programming, Greedy, Bit Manipulation
829Consecutive Numbers SumHard38Math, Enumeration
1356Sort Integers by The Number of 1 BitsEasy38Array, Bit Manipulation, Sorting, Counting
628Maximum Product of Three NumbersEasy38Array, Math, Sorting
645Set MismatchEasy38Array, Hash Table, Bit Manipulation, Sorting
3754Concatenate Non-Zero Digits and Multiply by Sum IEasy38Math
1979Find Greatest Common Divisor of ArrayEasy32Array, Math, Number Theory, Euclidean Algorithm, Greatest Common Divisor
1071Greatest Common Divisor of StringsEasy32Math, String, Euclidean Algorithm, Greatest Common Divisor
3345Smallest Divisible Digit Product IEasy32Math, Enumeration
2235Add Two IntegersEasy24Math
168Excel Sheet Column TitleEasy24Math, String
371Sum of Two IntegersMedium24Math, Bit Manipulation
868Binary GapEasy24Bit Manipulation
504Base 7Easy24Math, String
405Convert a Number to HexadecimalEasy24Math, String, Bit Manipulation
1344Angle Between Hands of a ClockMedium24Math
779K-th Symbol in GrammarMedium24Math, Bit Manipulation, Recursion
1823Find the Winner of the Circular GameMedium24Array, Math, Recursion, Queue, Simulation
223Rectangle AreaMedium24Math, Geometry
3513Number of Unique XOR Triplets IMedium24Array, Math, Bit Manipulation
263Ugly NumberEasy24Math
190Reverse BitsEasy24Divide and Conquer, Bit Manipulation
389Find the DifferenceEasy24Hash Table, String, Bit Manipulation, Sorting

23 · Union-Find (Disjoint Set Union) 5

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

Done#ProblemLevelFrequencyTopicsLinks
721Accounts MergeMedium38Array, Hash Table, String, Depth-First Search, Breadth-First Search, Union-Find, Sorting
827Making A Large IslandHard24Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix
1202Smallest String With SwapsMedium24Array, Hash Table, String, Depth-First Search, Breadth-First Search, Union-Find, Sorting
684Redundant ConnectionMedium24Depth-First Search, Breadth-First Search, Union-Find, Graph Theory
3532Path Existence Queries in a Graph IMedium24Array, Hash Table, Binary Search, Union-Find, Graph Theory

24 · Segment Tree & Fenwick Tree 2

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

Done#ProblemLevelFrequencyTopicsLinks
493Reverse PairsHard38Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set, Treap
2213Longest Substring of One Repeating CharacterHard32Array, String, Segment Tree, Ordered Set

SQL & JavaScript (practice on LeetCode) 7

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

Done#ProblemLevelFrequencyTopicsLinks
570Managers with at Least 5 Direct ReportsMedium32Database
626Exchange SeatsMedium32Database
176Second Highest SalaryMedium32Database
180Consecutive NumbersMedium32Database
1204Last Person to Fit in the BusMedium24Database
1193Monthly Transactions IMedium24Database
178Rank ScoresMedium24Database