Mobikwik interview question

Find if array is sorted and rotated