Leetcode 164. Maximum Gap
Given an integer array, find the maximum difference between successive elements in its sorted order; if fewer than two elements return 0. The catch is to achieve linear time and linear extra space (so use a bucket/pigeonhole or radix-style approach instead of an O(n log n) sort).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.