Practice · 1 of 5
Minimum Difference
CHALLENGE
Difficulty: beginner+25 XP
**Description:** Given n integers, find the minimum absolute difference
between any two of them.
**Input:** Line 1: n (2 <= n <= 10^5). Line 2: n integers (|a_i| <= 10^9).
**Output:** One integer — the minimum difference.
**Example:** 4 / 10 -7 3 22 -> 7 (pair 3 and 10).
Press Submit to check your solution.
Back to lesson: Practice: Sorting Set