Leetcode Monotonic Stack Python Problem Detector