← All problemsSign in

3788. Maximum Score of a Split

LeetCodeArrayPrefix SumOpen on judge ↗

You are given an integer array nums of length n. Choose an index i such that 0 <= i < n - 1. For a chosen split index i: - Let prefixSum(i) be the sum of nums[0] + nums[1] + ... + nums[i]. - Let suffixMin(i) be the minimum value among nums[i + 1], nums[i + 2], ..., nums[n - 1]. The score of a split at index i is defined as: score(i) = prefixSum(i) - suffixMin(i) Return an integer denoting t

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start