Problem 1599 · Medium

Maximum Profit of Operating a Centennial Wheel

Compute profit after each rotation from the waiting queue and keep the earliest rotation with the highest profit.

Open the interactive visualisation