Array Minimum
EasyArray
Description
Given a non-empty array of integers nums, return the smallest value.
Examples
Input:
nums = [3,1,4,1,5]Output:
1Explanation:
The smallest value present in the list is 1.
Input:
nums = [-7,-2,-9]Output:
-9Explanation:
The smallest value present in the list is -9.
Input:
nums = [42]Output:
42Explanation:
The smallest value present in the list is 42.
Constraints
- •
1 ≤ nums.length ≤ 10⁴ - •
-10⁹ ≤ nums[i] ≤ 10⁹