Minimum of an Array
Easy · rating 850 · arrays
The first line contains n. The second line contains n integers. Print the smallest.
Constraints: 1 ≤ n ≤ 105
Editorial
Minimum of an Array finds the smallest value in one pass, tracking a running minimum — exactly what the built-in min does.
print(min(nums))Complexity
Time: O(n). Space: O(1).