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]: [72, 36, 69, 43, 88, 14, 49, 82, 83, 26]
[EX A]: 2

[EX Q]: [170, 160, 150, 140, 130, 120, 110, 100, 90, 80, 70, 60, 50, 40]
[EX A]: 1

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