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: [15, 67, 9, 42, 92, 82, 37, 87, 64, 12]

Output: 2


Input: Consider Input: [35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105]

Output: 1


Input: Consider Input: [81, 53, 10, 74, 25, 45, 80, 69, 44, 13]


Output: 2