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

Input: Consider Input: [70, 74, 90, 85, 92, 3, 63, 57, 53, 91]

Output: 2

Input: Consider Input: [32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98, 101]

Output: 1

Input: Consider Input: [115, 108, 101, 94, 87, 80, 73, 66, 59, 52, 45, 38, 31, 24]
Output: 1