Company: Virtusa..._11oct

Difficulty: medium

Problem Statement

5 Days Challenge Problem Description Alice has set herself a 5-day challenge to get through N books, where each book contains A pages. She wants to spread the reading out as evenly as possible across the 5 days. Work out and return the smallest possible value for the largest number of pages she reads on any single day, given that all N books must be finished within exactly 5 days. Input Specification: input1: An integer value N, representing the number of books. input2: An integer array A, representing the number of pages in each book. Output Specification: Return an integer value representing the minimum number of pages she must read in a day to finish all the books in exactly 5 days. Examples Example 1: Input: input1 = 5, input2 = [4,10,20,30,40] Output: 20 Explanation: With the array [4,10,20,30,40], Alice can choose different ways to spread her reading across the 5 days: An unbalanced split: [1,1,1,1,100], reading 1 page on each of the first 4 days and 100 pages on the last day. He

More Virtusa..._11oct OA questionsInterview experiences