Easy
An array is monotonic if it is entirely non-increasing or entirely non-decreasing. Given nums, return true if it is monotonic.
nums
true
Input: nums = [1,2,2,3] Output: true
Input: nums = [6,5,4,4] Output: true
Input: nums = [1,3,2] Output: false