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:
[70, 74, 90, 85, 92, 3, 63, 57, 53, 91]

Ex Output:
2


Ex Input:
[19, 24, 29, 34, 39, 44, 49, 54, 59, 64, 69, 74, 79, 84, 89, 94, 99, 104, 109, 114, 119, 124, 129, 134, 139, 144]

Ex Output:
1


Ex Input:
[86, 50, 98, 96, 66, 38, 57, 56, 58, 65]

Ex Output:

2