mono stack | Cracking Leetcode