You are given an integer array power, where power[i] represents the power required to defeat the
You start with
You gain
Your mana points accumulate from day to day until you choose to defeat a monster.
You can defeat an undefeated monster power[i].
Upon defeating a monster, all accumulated mana points are immediately spent and your mana resets to
Return the minimum number of days needed to defeat all the monsters.
Constraints:
power.length
power[i]
You are given an integer array power, where power[i] represents the power required to defeat the
You start with
You gain
Your mana points accumulate from day to day until you choose to defeat a monster.
You can defeat an undefeated monster power[i].
Upon defeating a monster, all accumulated mana points are immediately spent and your mana resets to
Return the minimum number of days needed to defeat all the monsters.
Constraints:
power.length
power[i]