Check Array Is Sorted And Rotated Leetcode