Check if Array Is Sorted and Rotated

Solution Code

Time Complexity

O(n^2)

Space Complexity

O(1)