Minimum and Maximum

Easy · rating 850 · Arrays

The first line has n. The second line has n integers. Print the minimum and maximum, space-separated.

Constraints: 1 ≤ n ≤ 105

Related problems

Open Minimum and Maximum in Code Arena →