Monotonic Array Leetcode Question