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

Answer: 2


Question: [110, 106, 102, 98, 94, 90, 86, 82, 78, 74, 70, 66, 62, 58, 54, 50, 46, 42, 38, 34, 30, 26, 22, 18, 14]

Answer: 1


Question: [96, 85, 77, 11, 60, 55, 34, 37, 46, 10]

Answer:
2