instruction:
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:
[71, 45, 54, 41, 73, 74, 32, 38, 53, 18]
answer:
2


question:
[143, 138, 133, 128, 123, 118, 113, 108, 103, 98, 93, 88, 83, 78, 73, 68, 63, 58, 53, 48, 43, 38, 33, 28, 23]
answer:
1


question:
[19, 24, 29, 34, 39, 44, 49, 54, 59, 64, 69, 74, 79, 84, 89, 94, 99, 104, 109, 114, 119, 124, 129, 134, 139, 144]
answer:

1