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]: [43, 91, 52, 80, 67, 34, 10, 29, 11, 74]
[EX A]: 2

[EX Q]: [93, 76, 77, 21, 51, 95, 43, 25, 4, 82]
[EX A]: 2

[EX Q]: [88, 94, 68, 70, 49, 66, 91, 35, 17, 15]
[EX A]:
2