Find Minimum in Rotated Sorted Array

Given an array nums formed by taking a strictly ascending array of distinct integers and rotating it left by any number of positions, return its minimum value. A rotation may be zero positions, so the array may already be fully sorted. The input is guaranteed to contain at least one value. The function must return the value, not its index, and must not modify nums.

Examples
Input: [3,4,5,1,2]
Output: 1
Hints
Related Problems

Find Minimum in Rotated Sorted Array

Given an array `nums` formed by taking a strictly ascending array of distinct integers and rotating it left by any number of positions, return its minimum value. A rotation may be zero positions, so the array may already be fully sorted. The input is guaranteed to contain at least one value. The function must return the value, not its index, and must not modify `nums`.