We want every ‘node’ in the stack to keep track of the minimum value. So if we push -2, 0 and -3, the first 2 nodes will have -2 tracked as the minimum value. The -3 node updates the minimum value as -3.
We could create a new MinNode structure that tracks it, however, an easier method is to just keep track of an minStack array that tracks the same information.