Meta interview question

Write a program to check whether the array is monotonic