Linear DP that maintains best subarray ending at current index and global maximum.
single pass
constant
Linear DP
best ending here
circular, product
Step through updates of current and global best values.
Kadane derivation, edge cases with negatives, and common variants.