Data Structures & AlgorithmsVery hardGATE CS · TCS NQT

Four items of weight 4 each must be shipped in 2 boxes of equal capacity C (each box must hold whole items). What is the smallest feasible C?

  1. A. 4
  2. B. 8
  3. C. 16
  4. D. 6

Correct answer: B. 8

Each box must hold two items of weight 4, so C must be at least 8. Capacity 6 holds only one item per box, which leaves items unshipped.

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

Exams that ask this topic