Rosetta Problems

Find the Count of Monotonic Pairs I

https://leetcode.com/problems/find-the-count-of-monotonic-pairs-i