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

Ex Input:
[12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108]

Ex Output:
1


Ex Input:
[69, 49, 60, 58, 48, 82, 21, 83, 26, 67]

Ex Output:
2


Ex Input:
[67, 60, 74, 40, 18, 15, 84, 36, 52, 31]

Ex Output:

2