Largest Gap
Given a list of integers nums
, return the largest difference of two consecutive integers in the sorted version of nums
.
Constraints
n ≤ 100,000
wheren
is the length ofnums
https://binarysearch.com/problems/Largest-Gap
Examples
Example 1
Input
- nums =
[4, 1, 2, 8, 9, 10]
Output
- answer =
4
Explanation
The largest gap is between 4 and 8.
Leave a comment