sorted-rotated-at-most-one-break

Status: IN

A non-decreasing array rotated by any number of positions has at most 1 index where `nums[i] > nums[(i+1) % n]`; the algorithm makes exactly `n` circular comparisons (not `n-1`) to include the wrap-around.

Source: entries/2026/06/06/check-if-array-is-sorted-and-rotated-solution.md

JSON