← Amazon questions

Maximum gap between successive elements in sorted form

Filed under Amazon

Given an unsorted array of integers, return the maximum difference between successive elements in its sorted form. If the array contains less than 2 elements, return 0.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.