Original problem set
Every problem here trains the exact technique of a specific LeetCode problem, and says which one. The story, the examples, the constraints, the tests and the solutions are all original — so you have to reach for the pattern instead of recognising a statement you have already read a dozen times.
Your progress
0 / 1194
0 in progress · 1194 to do
Last 4 weeks. A square lights up on any day you mark a problem.
Submitting code against the 15,062 graded cases marks a problem solved automatically. You can also mark one yourself, which is not checked. Either way it stays in this browser and is never sent anywhere.
1194 problems
Array · Hash Table — maps to LeetCode 1, Two Sum
Array · Sorting — maps to LeetCode 56, Merge Intervals
String · Stack — maps to LeetCode 20, Valid Parentheses
Array · Dynamic Programming — maps to LeetCode 121, Best Time to Buy and Sell Stock
Array · Hash Table · String — maps to LeetCode 49, Group Anagrams
Hash Table · String · Sliding Window — maps to LeetCode 3, Longest Substring Without Repeating Characters
Array · Hash Table · Prefix Sum — maps to LeetCode 560, Subarray Sum Equals K
Array · Two Pointers · Dynamic Programming — maps to LeetCode 42, Trapping Rain Water
Array · Prefix Sum — maps to LeetCode 238, Product of Array Except Self
Two Pointers · String · Dynamic Programming — maps to LeetCode 5, Longest Palindromic Substring
Array · Hash Table · Counting — maps to LeetCode 347, Top K Frequent Elements
Array · Breadth-First Search · Matrix — maps to LeetCode 994, Rotting Oranges
Depth-First Search · Breadth-First Search · Graph Theory — maps to LeetCode 210, Course Schedule II
Array · Divide and Conquer · Heap (Priority Queue) — maps to LeetCode 23, Merge k Sorted Lists
Array · Two Pointers — maps to LeetCode 283, Move Zeroes
Array · Two Pointers · Sorting — maps to LeetCode 15, 3Sum
Array · Binary Search — maps to LeetCode 875, Koko Eating Bananas
Array · Divide and Conquer · Sorting — maps to LeetCode 215, Kth Largest Element in an Array
Array · String · Trie — maps to LeetCode 14, Longest Common Prefix
Array · Binary Search · Divide and Conquer — maps to LeetCode 4, Median of Two Sorted Arrays
Array · Two Pointers · Greedy — maps to LeetCode 11, Container With Most Water
Array · Hash Table · Union-Find — maps to LeetCode 128, Longest Consecutive Sequence
Array · Queue · Sliding Window — maps to LeetCode 239, Sliding Window Maximum
Two Pointers · String — maps to LeetCode 125, Valid Palindrome
Array · Binary Search — maps to LeetCode 34, Find First and Last Position of Element in Sorted Array
Array · Dynamic Programming · Divide and Conquer — maps to LeetCode 53, Maximum Subarray
Array · Binary Search — maps to LeetCode 33, Search in Rotated Sorted Array
Array · Two Pointers · Greedy — maps to LeetCode 253, Meeting Rooms II
Array · Matrix · Simulation — maps to LeetCode 54, Spiral Matrix
Depth-First Search · Breadth-First Search · Graph Theory — maps to LeetCode 207, Course Schedule
Hash Table · String · Backtracking — maps to LeetCode 17, Letter Combinations of a Phone Number
Two Pointers · String — maps to LeetCode 443, String Compression
Hash Table · String · Sliding Window — maps to LeetCode 424, Longest Repeating Character Replacement
Array · Math · Two Pointers — maps to LeetCode 189, Rotate Array
Hash Table · String · Queue — maps to LeetCode 387, First Unique Character in a String
Array · Two Pointers · Sorting — maps to LeetCode 88, Merge Sorted Array
String · Stack · Recursion — maps to LeetCode 394, Decode String
Hash Table · String · Sorting — maps to LeetCode 242, Valid Anagram
Array · Dynamic Programming · Breadth-First Search — maps to LeetCode 322, Coin Change
Array · String · Backtracking — maps to LeetCode 79, Word Search
A problem set is only worth practising on if the answers are right. Here is what each of the 1194 problems had to survive before it appeared on this page.
Each problem starts from a structured brief: the technique, difficulty, topic tags, function shape and numeric bounds of its parent. The parent's own wording, examples and editorials are never part of the input, so the text you read is genuinely ours.
The reference solution is run against every worked example and every test case before a problem ships. If an example's stated output disagrees with the code, the problem does not publish.
A second, deliberately slow implementation is written independently and both are fuzzed against each other on random inputs. Then known-wrong variants of the solution are run against the tests — if a wrong version passes, the test set is too weak and gets fixed.
A separate review pass checks the claimed time and space complexity, hunts for hints leaking into example explanations, and confirms the solution survives the largest input the constraints allow.
Open any problem and there is an editor next to it, with a typed starter signature in Python, JavaScript, TypeScript, Java, C++, Go and Ruby. Submit runs your code against every graded case and shows the first one that disagrees, with the input, your output and what was expected. Python and JavaScript execute in your own browser, so they need no account and start instantly; the compiled languages go to a sandboxed runner, which needs a free account because compiling costs real CPU.
Two limits worth knowing up front. Timings are wall-clock on whichever machine ran the code, not a standardised box, so read them against your own previous attempts rather than anyone else's. And submissions are stored in your browser, which means no cross-device history and no percentile ranking — with no shared submissions table, “faster than 78%” would be a number we invented. Four problems take arbitrarily nested input that no fixed type describes, so they offer the dynamically typed languages only; the picker says so rather than hiding them.
1194 original practice problems across 132 topics.