Maximum Points After Enemy Battles
Maximum Points After Enemy Battles gives an energy budget and enemy array. Spend energy to earn points or mark enemies for energy, and return the greatest score possible.
We'll cover the following...
We'll cover the following...
Statement
You are given an integer array enemyEnergies where each element represents the energy value of an enemy, and an integer currentEnergy representing your initial energy.
You start with
Operation 1 — Choose an unmarked enemy i such that currentEnergy >= enemyEnergies[i]:
Your points increase by
. Your energy decreases:
currentEnergy = currentEnergy -...