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

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

[EX Q]: [32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168]
[EX A]: 1

[EX Q]: [45, 51, 57, 63, 69, 75, 81, 87, 93, 99, 105, 111, 117, 123, 129, 135]
[EX A]:
1