Write code to keep track of the running minimum in a stack.
Anonymous
Use a second stack. If a new element pushed onto the stack is less than or equal to the current minimum (the top of the minimum stack), then push the new element onto the minimum stack. If an element is popped off the stack, if it's equal to the item on top of the minimum stack, pop off the top of the minimum stack.
Check out your Company Bowl for anonymous work chats.