Google interview question

Write a stack that keeps track of min and max elements.