Data Structures & AlgorithmsVery hardICPC regional · GATE CS

Jobs of lengths [7, 6, 5, 4, 3, 3] are assigned to 2 identical machines. Each job runs on one machine without interruption. What is the minimum possible makespan (largest total load on any machine)?

  1. A. 15
  2. B. 28
  3. C. 14
  4. D. 7

Correct answer: C. 14

The lower bound ⌈28/2⌉ = 14 is reached by {7, 4, 3} and {6, 5, 3}, so 14 is optimal. Greedy least-loaded assignment taking jobs in ascending order ends at 15; 28 puts everything on one machine and 7 is just the longest job.

More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions

Exams that ask this topic