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]: [81, 53, 10, 74, 25, 45, 80, 69, 44, 13]
[EX A]: 2

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

[EX Q]: [98, 74, 39, 52, 59, 70, 64, 10, 47, 19]
[EX A]:
2