Monotonic Arrays
A monotonic array is an array whose elements, from left to right, are entirely non increasing, or entirely non decreasing. Return true if the given array is monotonic.
Sample Input:
[-1, -5, -10, -1100, -1100, -1101, -1102, -9001]
Sample Output:
true
Explanation:
All the elements in the input array are strictly non increasing.