Algorithm · Pinterest · Hard
Question You are given an array nums containing non-negative integers and an integer m. Partition the array into m non-empty, contiguous subarrays. Among all valid partitions, find the one whose greatest subarray sum is as small as possible. Return that minimum achievable largest sum. Input Format The first line provides two integers, n and m. The second line provides n non-negative integers that form nums. Output Format Output a single integer representing the smallest…
Checking your access…