Hackerearth OA 2021 Difficult problem - need help
Anonymous User
458

The question there was:

There are n books. A group of k people is going to read them all. For each book, you know the time it takes to read it. One person reads a book from beginning to end without switching to another book and only one person can read that particular book at a given time.

Determine the minimum total time such that everyone reads every book.

For examples:
Input
n = 3, k = 3, times = [8, 7, 2]

Output
24

Constraints

1 < k, n <= 10^5
1 <= ti <= 10^9

Anyone know how to approach the problem? Any solutions?

Comments (1)