Array element
Current window
Best window
Outside window

Controls

Time: O(n) | Space: O(1)

Steps

0 steps

Press Run to trace the algorithm one step at a time.