Problem · Binary Search
Minimum Memory for Hard Drives
Learn this problemProblem statement
The general meaning of the question is as described. I will follow up in detail once I find reliable sources.
The second question is about distributing games to N children. There are m games in total, and the memory size of each game is stored in an array. You need to prepare N hard drives to distribute the games to the children. The requirement is that each child must receive at least one game, and all games must be distributed. The question asks: What is the minimum memory capacity required for each of the N hard drives?
Function
minimumMemory(games: int[], N: int) → intExamples
Example 1
games = [6, 7, 10, 12, 1]N = 3return = 13The minimum memory for each hard drive would be 13.
Constraints
🍇🍇More Amazon problems
- Resolve Task DependenciesONSITE INTERVIEW · Seen Jul 2026
- Shortest Distance on a Circular Bus RouteOA · Seen Jul 2026
- Longest Increasing Subsequence With Bounded Adjacent DifferenceONSITE INTERVIEW · Seen Jul 2026
- Search in a Rotated Sorted ArrayONSITE INTERVIEW · Seen Jul 2026
- Sliding Window MaximumONSITE INTERVIEW · Seen Jul 2026
- Merge IntervalsOA · Seen Jul 2026
- Sort Bug Report FrequenciesOA · Seen Jul 2026
- Drone Delivery RouteOA · Seen Jul 2026