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

Example input: [1,2,2,3]
Example output: 1
Example explanation: The array is monotonic as 1 < 2 <= 2 < 3
Q: [101, 93, 85, 77, 69, 61, 53]
A:
1