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: [102, 99, 96, 93, 90, 87, 84, 81, 78, 75, 72, 69, 66, 63, 60, 57, 54, 51, 48, 45, 42, 39, 36, 33]

Answer: 1


Question: [37, 9, 23, 27, 77, 74, 50, 69, 52, 76]

Answer: 2


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

Answer:
2