Skip to content

Practice Split Array Largest Sum

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Hard#410
LeetCode Problem

Split Array Largest Sum

Problem Statement

Given an integer array nums and an integer k, split nums into k non-empty subarrays such that the largest sum of any subarray is minimized. Return the minimized largest sum of the split. A subarray is a contiguous part of the array.

Source: Split Array Largest Sum on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
nums = [7,2,5,10,8], k = 2
Output
18

# Example 2

Input
nums = [1,2,3,4,5], k = 2
Output
9

Constraints

1 <= nums.length <= 1000
0 <= nums[i] <= 10^6
1 <= k <= min(50, nums.length)

Related LeetCode Problems

Practice more problems similar to Split Array Largest Sum.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.