Opening your workspace…
Workspace/Coding room
Opening your workspace…
The pickup counter records how many drinks leave during each minute. A tray runner will cover exactly width consecutive minutes. Return [start, drinks], where start is the zero-based first minute of the run serving the most drinks and drinks is its total. If several runs tie, choose the earliest starting minute. Every minute in the chosen run must be included.
[2,5,1,6,3], 3OUTPUT[1,12]The three totals are 8, 12, and 10. The best run starts at minute 1.
[4,0,4,0], 2OUTPUT[0,4]All three runs serve four drinks, so choose the earliest start, 0.
Tab inserts two spaces. Press Escape, then Tab, to leave the editor. Press Control or Command and Enter to submit.
[2,5,1,6,3], 3[1,12]Public samples only. These checks do not award ranked points.
Walk through a solution, check its time and space costs, and compare it with yours.
Checking your progress…