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]: [61, 60, 12, 84, 10, 39, 90, 92, 6, 38]
[EX A]: 2

[EX Q]: [22, 0, 4, 45, 87, 13, 38, 35, 12, 72]
[EX A]: 2

[EX Q]: [7, 68, 4, 23, 34, 61, 98, 5, 15, 26]
[EX A]:
2