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]: [48, 71, 3, 82, 87, 96, 86, 57, 69, 59]
[EX A]: 2

[EX Q]: [12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152]
[EX A]: 1

[EX Q]: [23, 33, 43, 53, 63, 73, 83, 93, 103, 113, 123, 133, 143, 153]
[EX A]:
1