Leetcode Find The Maximum And Minimum Element In A Stack