Min Stack, built three ways

Try:
CALL
1 / 1

Code

The highlighted line runs next. The pill shows the live values in the running call.

Cost

Work done so far, and how the three solutions compare

Calls and output

Each call, with what it returns underneath

Keyboard: ← → step, Space play or pause. Type calls like "push 5, pop, top, getMin" (up to 14, values -99 to 99), or paste LeetCode's ["MinStack","push",…] list. The page checks that pop, top and getMin are never called on an empty stack.