language-icon Old Web
English
Sign In

Pigeonhole sort

Pigeonhole sorting is a sorting algorithm that is suitable for sorting lists of elements where the number of elements (n) and the length of the range of possible key values (N) are approximately the same. It requires O(n + N) time. It is similar to counting sort, but differs in that it 'moves items twice: once to the bucket array and again to the final destination counting sort builds an auxiliary array then uses the array to compute each item's final destination and move the item there.' Pigeonhole sorting is a sorting algorithm that is suitable for sorting lists of elements where the number of elements (n) and the length of the range of possible key values (N) are approximately the same. It requires O(n + N) time. It is similar to counting sort, but differs in that it 'moves items twice: once to the bucket array and again to the final destination counting sort builds an auxiliary array then uses the array to compute each item's final destination and move the item there.'

[ "Merge sort", "Insertion sort", "Bubble sort", "External sorting", "Counting sort" ]
Parent Topic
Child Topic
    No Parent Topic