Problems
Every problem here has a full walkthrough: the statement in plain words, hints that give away one idea at a time, a traced solution with its cost worked out, and the mistakes people make. They are listed in curriculum order, so the early ones need only the early modules.
0%0 of 21 solved
- Maximum SubarrayArrays & Sequences, kadane, dpO(n)Medium
- Product of Array Except SelfArrays & Sequences, prefix, suffix, no-divisionO(n)Medium
- Subarray Sum Equals KArrays & Sequences, prefix-sum, hash-mapO(n)Medium
- Linked List Cycle IIThe Discipline of Pointers, floyd, cycle-startO(n)Medium
- Merge Two Sorted ListsThe Discipline of Pointers, dummy-head, two-pointer, iterativeO(m + n)Easy
- Reverse Linked ListThe Discipline of Pointers, in-place, pointersO(n)Easy
- Longest Substring Without Repeating CharactersAdvanced String Manipulation, sliding-window, hash-map, two-pointerO(n)Medium
- Minimum Window SubstringAdvanced String Manipulation, sliding-window, hash-map, need-counterO(|s| + |t|)Hard
- Contains DuplicateThe Algebra of Membership, set, hash, sortingO(n)Easy
- Top K Frequent ElementsThe Algebra of Membership, counter, bucket-sort, heapO(n)Medium
- Two SumThe Algebra of Membership, array, hash-mapO(n)Easy
- Binary Tree Maximum Path SumRecursion as Structural Induction, post-order, return-up, global-maxO(n)Hard
- Validate Binary Search TreeRecursion as Structural Induction, bounds, recursion, in-orderO(n)Medium
- Coin ChangeThe Geometry of Optimal Substructure, unbounded-knapsack, dp-1d, bfsO(amount * n)Medium
- Longest Common SubsequenceThe Geometry of Optimal Substructure, dp, 2D-stringO(n × m)Medium
- Course ScheduleThe Vocabulary of Relationships, topological-sort, cycle-detection, bfs, dfsO(V + E)Medium
- Number of IslandsThe Vocabulary of Relationships, grid, dfs, bfs, union-findO(m × n)Medium
- Kth Largest ElementThe Price of Order, quickselect, heapO(n) expectedMedium
- Search in Rotated Sorted ArrayThe Price of Order, binary-search, pivotO(log n)Medium
- 3Sum Triplet TargetTwo Hands on a Number Line, sort, two-pointer, duplicate-skipO(n^2)Medium