原题链接在这里:https://leetcode.com/problems/max-stack/description/ 题目: Design a max stack that supports push, pop, top, peekMax and popMax. push(x) -- Push element x onto stack. pop() -- Remove the element on top of the stack and return it. top() -- Get th…