Tap here to switch tabs
Problem
Submissions

Problem: Maximum Absolute Sum of Any Subarray

Maximum Absolute Sum of Any Subarray asks you to find the largest absolute value of the sum of elements in any contiguous subarray of an integer array, which may include negatives.

Statement

Given an integer array nums, find the maximum absolute sum of any contiguous subarray within nums.

The absolute sum of a subarray is defined as the absolute value of the sum of all elements contained in that subarray.

Constraints:

  • 1≤1 \leq nums.length ≤105\leq 10^5

  • −104≤-10^4 \leq nums[i] ≤104\leq 10^4

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Absolute Sum of Any Subarray

Maximum Absolute Sum of Any Subarray asks you to find the largest absolute value of the sum of elements in any contiguous subarray of an integer array, which may include negatives.

Statement

Given an integer array nums, find the maximum absolute sum of any contiguous subarray within nums.

The absolute sum of a subarray is defined as the absolute value of the sum of all elements contained in that subarray.

Constraints:

  • 1≤1 \leq nums.length ≤105\leq 10^5

  • −104≤-10^4 \leq nums[i] ≤104\leq 10^4