Given an array of integers `pages` representing the number of pages in `n` books and a number of students `k`, allocate the books to `k` students such that each student gets at least one book, all books are assigned, and each assignment is a contiguous block of books. The goal is to minimize the maximum number of pages assigned to any single student.
{
"pages": [
12,
34,
67,
90
],
"k": 2
}113{
"pages": [
10,
20,
30,
40
],
"k": 2
}60{
"pages": [
10,
5,
20
],
"k": 2
}20Sign in to Run Code and Submit