Algorithm · Uber · Medium
You have a collection of assets. Each asset starts with a given value and may be upgraded repeatedly to raise that value. Using no more than the available budget, determine the greatest minimum value that all assets can attain. You are given: values: an array in which values[i] is the starting value of asset i costs: an array in which costs[i] is the price of one upgrade for asset i totalCost: the total amount available for upgrades Choose a nonnegative number of upgrades…
Checking your access…