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:
[98, 33, 77, 20, 75, 1, 47, 0, 11, 5]

Ex Output:
2


Ex Input:
[102, 99, 96, 93, 90, 87, 84, 81, 78, 75, 72, 69, 66, 63, 60, 57, 54, 51, 48, 45, 42, 39, 36, 33]

Ex Output:
1


Ex Input:
[140, 134, 128, 122, 116, 110, 104, 98, 92, 86, 80, 74, 68, 62, 56, 50]

Ex Output:

1