Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Algorithm

Pigeonhole Sort Algorithm

Sorting Algorithm

Pigeonhole sort is a sorting algorithm suited to lists whose number of elements and whose range of possible key values are of roughly the same size, giving it a running time linear in the combined size of the input and the key range. It is similar to counting sort but moves each item directly into a pigeonhole bucket that matches its key rather than first building a separate count array and computing final positions from it.

Facts
Time Complexity
Time Complexity (category)
Linear Time -- O(n) 1
Sources
1. Pigeonhole Sort Algorithm (Wikipedia)
Wikipedia infobox: time complexity linear
Quote, Wikipedia infobox: time complexity linear
linear
View the Source
NIST Dictionary of Algorithms and Data Structures: pigeonhole sort
NIST Dictionary of Algorithms and Data StructuresIn Group: Distribution and Integer Sorting Algorithms, Definition
Quote, In Group: Distribution and Integer Sorting Algorithms, Definition
then moves each item to its key's bucket.
View the Source
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.