CT195

Most Uneven Garden Bed

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Find the difference between the greatest and least bed measurement. Task: Find maximum minus minimum. Input format: n followed by n integers. Output format: One integer: max(a)-min(a). Constraints: 1 <= n <= 100000; -10^9 <= a[i] <= 10^9 Edge rules: Apply the stated zero, tie, boundary, and ordering conventions exactly.

Example 1:

Input: 1 5
Output: 0

Example 2:

Input: 1 -3
Output: 0

Example 3:

Input: 5 4 1 9 -2 6
Output: 11

Constraints:

1 <= n <= 100000; -10^9 <= a[i] <= 10^9

Tags:

arrays min-max
Loading...
Test Cases:No test cases
No test cases available.
Most Uneven Garden Bed - EASY Coding Problem | CodeTikki