Live Batches
Masterclasses
Menu
Free Courses
Account
Login / Sign Up
Problem Submissions Solution

Allocate Minimum Pages

Difficulty: Medium

Acceptance: 62.00%

Points: 30.00

Given an array pages where pages[i] represents the number of pages in the ith book, and an integer m representing the number of students, allocate the books such that each student gets at least one book and each book is assigned to exactly one student. Books must be allocated in contiguous order. The task is to minimize the maximum number of pages assigned to any student. Return the minimum possible value of the maximum pages assigned.

Topics

Companies

Articles

Examples:

N/A

Constraints:
  • 1 = pages.length = 105
  • 1 = pages[i] = 105
  • 1 = m = pages.length
Companies:
eBay
Topics:
Binary Search
Locked Content
Access Restricted: Please Login to access the code editor and test cases.