Hi, An approach could be to guess the answer `A` and check if in `A` time, all the tasks can be completed. For checking, just iterate through the k people, the number of tasks completed would be `A`/k[i] (integer division) for everyone. If sigma(`A`/k[i]) >= N, `A` works. Now do a binary search to find the minimum `A` which works. The upper bound could be N*min(k[i]) giving all tasks to be solved by the person which takes the least amount of time.
Time complexity will be k*log(N*min(k[i]) On Sun, Apr 22, 2018 at 1:58 PM, pawan yadav <[email protected]> wrote: > Hi All, > > Has anybody solved the following problem? > > https://www.careercup.com/question?id=5196860946907136 > > -Pawan > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > -- - Saurabh Paliwal B-Tech. Comp. Science and Engg. IIT ROORKEE -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
