← All problemsSign in

3826. Minimum Partition Score

LeetCodeArrayDivide and ConquerDynamic ProgrammingQueuePrefix SumMonotonic QueueOpen on judge ↗

You are given an integer array nums and an integer k. Your task is to partition nums into exactly k subarrays and return an integer denoting the minimum possible score among all valid partitions. The score of a partition is the sum of the values of all its subarrays. The value of a subarray is defined as sumArr * (sumArr + 1) / 2, where sumArr is the sum of its elements. Example 1: Input: n

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