← ALL NOTES
Array

1752. Check if Array Is Sorted and Rotated

Determine whether nums is a cyclic rotation of some non-decreasing (sorted, duplicates allowed) array. Count the cyclic "drops" — positions where nums[i] > nums[(i+1)%n] — and check there's at most…

Loading…