Maximum Gap
Hard
Array Techniques
Print the maximum difference between two successive elements of the array in sorted order (0 if fewer than two elements). The solution should run in linear time.
Constraints
1 <= n <= 10^5 0 <= nums[i] <= 10^9
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.