Amazon Interview Question

Technical question to write code to implement some stack operations in a class and return the max