Bin Sort: Time and Space
Creating the arrays and performing the concatenation takes ?(N).
Inserting the data records takes ?(n).
Overall time complexity is ?(N+n).
Space requirements: ?(N) for Head and Tail arrays, ?(n) for holding the records.
Overall space complexity is ?(N+n).
If we know that in some class of sorting problems N = n or N = c n, then Bin Sort gives us a linear-time, linear space sorting algorithm, which has a lower asymptotic growth rate than the well known n log n time algorithms such as Heapsort.