Press "Enter" to skip to content

Checking Array Monotonicity with Python

Pawan Khowal shows us how to check whether an array is constantly increasing:

In this puzzle you have to check whether an array is Monotonic or not

Though it looks like the solution actually shows whether the array is strictly monotonic rather than monotonic (i.e., weakly monotonic), as it allows for ties.