Strictly increasing longest monotonic subsequence ready
Cleaner code
Strictly decreasing longest monotonic subsequence ready
Weakly decreasing longest monotonic subsequence ready
Common code in longest_monotonic_subsequence extracted