Facebook Interview QuestionSDE1s
- 3of 3 votes
there is a bunch of tasks, each have different time to complete, task is independent, and then there are some workers,
How to allocate tasks to these workers to minimize the total time to complete all the task. The tasks can be randomly picked from the task list.
Task: 2,2,3,7, 1
Return 8, because the first worker can work on the first three tasks : 2 + 2 + 3 = 7, and the second worker can work on the last two tasks : 7 + 1 = 8, so the total time to finish all the task is 8.
public int getMini(int tasks, int k)
Country: United States