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: [72, 36, 69, 43, 88, 14, 49, 82, 83, 26]

Output: 2


Input: Consider Input: [81, 69, 13, 34, 10, 80, 33, 7, 86, 65]

Output: 2


Input: Consider Input: [41, 10, 1, 63, 24, 69, 71, 43, 37, 50]


Output: 2