Indeed Interview Question

How do you optimize getting minimum of the stack in O(1) runtime and O(n) space.