You are given an integer array strength of length n, representing the strengths of n different locks.
Initially, your accumulated energy is X set to
Every minute, your accumulated energy increases by X. You can choose to break an unbroken lock with a strength of strength[i] at any minute where your current accumulated energy is at least strength[i].
Breaking a lock immediately resets your accumulated energy to X by
Return the minimum number of minutes needed to break all
Constraints:
n == strength.length
n
strength[i]
You are given an integer array strength of length n, representing the strengths of n different locks.
Initially, your accumulated energy is X set to
Every minute, your accumulated energy increases by X. You can choose to break an unbroken lock with a strength of strength[i] at any minute where your current accumulated energy is at least strength[i].
Breaking a lock immediately resets your accumulated energy to X by
Return the minimum number of minutes needed to break all
Constraints:
n == strength.length
n
strength[i]