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: [92, 44, 43, 88, 42, 91, 54, 51, 79, 45]

Output: 2


Input: Consider Input: [55, 27, 83, 68, 4, 81, 88, 70, 52, 11]

Output: 2


Input: Consider Input: [6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108]


Output: 1