Every number in the given array is the number of milliseconds after which it will be pushed to the sorted array. Sleep sort uses no comparison operations and always completes within constant time (the biggest number in array milliseconds), hence O(max(input)+n) complexity.