Microsoft interview question

implement Stack interface with one additional method of getting the max element in O(1) time complexity.