Maximum Subarray
Find the largest sum of a contiguous slice. See how a recursive choice becomes a fast, elegant solution.
Explore interactive walkthroughs, find the idea behind each solution, and keep track of what you’ve finished.
Explore problemsPick a topic and learn at your own pace.
Find the largest sum of a contiguous slice. See how a recursive choice becomes a fast, elegant solution.
Choose values in order to make the longest rising sequence, then watch the tails array evolve step by step.
Choose each item once or skip it. Watch recursive branches and memoized answers find the best value within a weight limit.
Reuse item types without limit. See why taking keeps the same index and how memoization avoids repeated calls.
Sort widths with a crucial height tie-break, then watch a height LIS reveal the longest nesting.
Sort the numbers, grow the best divisible chain at each value, and follow parent links back to an answer.
Choose matching letters in order and trace a memoized recursion that prints one longest answer.
Merge two strings in the shortest possible way by watching recursive choices and memo hits.
Count distinct choices of B’s indices that spell A, using recursive use-or-skip decisions.
See why * changes the base case, then trace skip-or-consume recursion with memoization.
Try another keyword or change your filters.