4

Allocate minimum number of pages

 1 year ago
source link: https://www.geeksforgeeks.org/videos/allocate-minimum-number-of-pages/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Allocate minimum number of pages

August 01, 2023 |410 Views
Allocate minimum number of pages
Searching, Sorting, SDE Sheet, GFG SDE Sheet
 Save  Share   Like
Description
Discussion

In this problem, we are given that there are N books and M students. Also given are the number of pages in each book in ascending order. The task is to assign books in such a way that the maximum number of pages assigned to a student is minimum, with the condition that every student is assigned to read some consecutive books. We have to print that minimum number of pages.

Example :

Input: N = 4, pages[] = {12, 34, 67, 90}, M = 2

Output: 113

Read More

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK