Search
⌘K

Leetcode 1749. Maximum Absolute Sum of Any Subarray

Find the maximum absolute sum of any contiguous subarray (possibly empty) in an integer array — i.e., the maximum of the largest subarray sum and the absolute of the smallest subarray sum. This is solved in linear time by a Kadane-like scan that tracks running max and min subarray sums.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.