You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right

[Q]: [154, 145, 136, 127, 118, 109, 100, 91, 82, 73, 64, 55, 46, 37, 28]
[A]: 1


[Q]: [193, 184, 175, 166, 157, 148, 139, 130, 121, 112, 103, 94, 85, 76, 67, 58, 49, 40, 31, 22]
[A]: 1


[Q]: [28, 37, 46, 55, 64, 73, 82, 91, 100, 109, 118, 127]
[A]:
1