leetcode
896. Monotonic Array
Solution code
Time complexity: O(n)
Space complexity: O(1)