2141. Maximum Running Time of N Computers

Difficulty: Hard

Topics: Array, Binary Search, Greedy, Sorting, Weekly Contest 276

You have n computers. You are given the integer n and a 0-indexed integer array batteries where the iᵗʰ battery can run a computer for batteries[i] minutes. You are interested in running all n computers simultaneously...