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 Input:
[69, 49, 60, 58, 48, 82, 21, 83, 26, 67]

Ex Output:
2


Ex Input:
[113, 107, 101, 95, 89, 83, 77, 71, 65, 59, 53, 47, 41, 35, 29, 23, 17, 11]

Ex Output:
1


Ex Input:
[92, 44, 43, 88, 42, 91, 54, 51, 79, 45]

Ex Output:

2