leetle

Daily challenge for 2026-07-28

574. Check if Array is Sorted and Rotated

Given an array of integers nums, return true if the array was originally sorted in strictly increasing order, then rotated some number of positions (including zero). Otherwise, return false. There are no duplicate elements in the array.

Example:
Input: nums = [3, 4, 5, 1, 2]
Output: true

Run this challenge interactively in Python or JavaScript when the app loads.