Rosetta Problems

Find the Count of Monotonic Pairs II

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