Find Minimum Pen Drive Capacity

Problem Overview

  • Core task: Find the minimum identical pen drive capacity to distribute all games to k children.
  • Inputs/outputs: gameSize[] (n game sizes) and k; return the smallest integer capacity.
  • Constraints: Each child gets 1–2 games; every child at least one; no game unassigned; per-child sum ≤ capacity.
  • Context: Real-world allocation of large computer game files to USB pen drives.
  • From Amazon interviews; a coding interview problem and common interview question.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: