DIY: Monotonic Array

Problem statement

An array is monotonic if it is either monotone increasing or monotone decreasing.

An array, arr, is monotone increasing if arr[i] <= arr[i + 1] for every element at each index i. An array, arr, is monotone decreasing if ...

Create a free account to view this lesson.

Continue your learning journey with a 14-day free trial.

By signing up, you agree to Devpath's Terms of Service and Privacy Policy