A Ferris wheel has runningCost.
You are given an integer array customers of length n, where customers[i] represents the number of new customers arriving before rotation boardingCost.
Before each rotation, at most
You may choose to stop rotating the wheel at any point.
Return the minimum number of rotations required to achieve the maximum possible profit. If it is impossible to achieve a strictly positive profit, return
Constraints:
n customers.length
n
customers[i]
boardingCost, runningCost
A Ferris wheel has runningCost.
You are given an integer array customers of length n, where customers[i] represents the number of new customers arriving before rotation boardingCost.
Before each rotation, at most
You may choose to stop rotating the wheel at any point.
Return the minimum number of rotations required to achieve the maximum possible profit. If it is impossible to achieve a strictly positive profit, return
Constraints:
n customers.length
n
customers[i]
boardingCost, runningCost