Algorithm · Capital One · Medium
Requirements The inputs are an integer t representing the required operating time in minutes, capacity[i] representing the minutes supplied by fully charged battery i, and recharge[i] representing how many minutes battery i needs to recharge after being emptied. The phone draws power from exactly one battery at once. Once that battery runs out, it must be replaced with another battery that has completed recharging at that time; the removed battery begins recharging at the…
Checking your access…