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

Answer: 2


Question: [93, 76, 77, 21, 51, 95, 43, 25, 4, 82]

Answer: 2


Question: [97, 70, 43, 40, 12, 50, 55, 18, 61, 10]

Answer:
2