Implement a stack with a max function that returns the maximum value in the stack.
The candidate's solution is correct and uses a stack to store the values and a variable to store the max value. The max value is updated every time a new value is pushed to the stack. The max function returns the max value.
Evaluated at: 2022-11-22 18:15:29