Array Range
Easy · rating 900 · Arrays
The first line contains n. The second line has n integers. Print the difference between the largest and smallest (the range).
Constraints: 1 ≤ n ≤ 105, |ai| ≤ 109
Related problems
- Class Average — Easy
- Count Even Numbers — Easy
- Sum of Even Elements — Easy
- Temperature Swing — Easy
- Two Sum — Easy
- Array Sum — Easy