3273. Minimum Amount of Damage Dealt to Bob
You are given an integer
powerand two integer arraysdamageandhealth, both having lengthn.Bob has
nenemies, where enemyiwill deal Bobdamage[i]points of damage per second while they are alive (i.e.health[i] > 0).Every second, after the enemies deal damage to Bob, he chooses one of the enemies that is still alive and deals
powerpoints of damage to them.Determine the minimum total amount of damage points that will be dealt to Bob before all
nenemies are dead.
1 | class Solution { |