Tap here to switch tabs
Problem
Submissions

Problem: Maximum Sum Score of Array

Try to solve the Maximum Sum Score of Array problem.

Statement

You are given a 00 indexed integer array nums of length n.

The sum score at index i for 0≤i<n0 \leq i < n is defined as the maximum of:

  • The sum of the first i+1i + 1 elements of nums.

  • The sum of the last n−in - i elements of nums.

Return the maximum sum score among all possible indices from 00 to n−1n - 1.

Constraints:

  • n == nums.length

  • 1≤n≤1051 \leq n \leq 10^5

  • −105≤-10^5 \leq nums[i] ≤105\leq 10^5

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Sum Score of Array

Try to solve the Maximum Sum Score of Array problem.

Statement

You are given a 00 indexed integer array nums of length n.

The sum score at index i for 0≤i<n0 \leq i < n is defined as the maximum of:

  • The sum of the first i+1i + 1 elements of nums.

  • The sum of the last n−in - i elements of nums.

Return the maximum sum score among all possible indices from 00 to n−1n - 1.

Constraints:

  • n == nums.length

  • 1≤n≤1051 \leq n \leq 10^5

  • −105≤-10^5 \leq nums[i] ≤105\leq 10^5