Code
The highlighted line runs next. The pill shows the live values in the running call.
Variables
The data structures the code is building
The array
Brackets below = subarrays being tracked; gold above = best so far
Given an integer array nums, return the largest product of a contiguous, non-empty subarray.
The highlighted line runs next. The pill shows the live values in the running call.
The data structures the code is building
Brackets below = subarrays being tracked; gold above = best so far
n = len(nums). The highlighted row is the solution being traced.
Keyboard: ← → step, Space play or pause. Integers from −10 to 10; drawings use at most 10 numbers for brute force and 14 for the others.