DIY: Monotonic Array
Solve the interview question "Monotonic Array" yourself in this lesson.
We'll cover the following...
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
. ...