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:
[3, 75, 96, 40, 12, 21, 95, 4, 80, 85]

Ex Output:
2


Ex Input:
[18, 23, 28, 33, 38, 43, 48, 53, 58, 63, 68, 73, 78, 83, 88, 93, 98, 103, 108, 113, 118, 123, 128, 133, 138]

Ex Output:
1


Ex Input:
[46, 56, 16, 32, 99, 30, 57, 93, 64, 28]

Ex Output:

2