Split Array Largest Sum

Programming Interview Hard 5 views
Back to Questions

Problem Description

You're given {x}. Split array into m non-empty continuous parts to minimize the maximum part sum. Output that minimum possible value.

Input Format

First line n m. Second line n integers.

Output Format

One integer answer.

Sample Test Case

Input:
5 2 7 2 5 10 8
Output:
18

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next