Global Information Lookup Global Information

Pigeonhole sort information


Pigeonhole sort
ClassSorting algorithm
Data structureArray
Worst-case performance, where N is the range of key values and n is the input size
Worst-case space complexity
OptimalIf and only if

Pigeonhole sorting is a sorting algorithm that is suitable for sorting lists of elements where the number n of elements and the length N of the range of possible key values are approximately the same.[1] 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 [whereas] counting sort builds an auxiliary array then uses the array to compute each item's final destination and move the item there."[2]

The pigeonhole algorithm works as follows:

  1. Given an array of values to be sorted, set up an auxiliary array of initially empty "pigeonholes", one pigeonhole for each key in the range of the keys in the original array.
  2. Going over the original array, put each value into the pigeonhole corresponding to its key, such that each pigeonhole eventually contains a list of all values with that key.
  3. Iterate over the pigeonhole array in increasing order of keys, and for each pigeonhole, put its elements into the original array in increasing order.
  1. ^ "NIST's Dictionary of Algorithms and Data Structures: pigeonhole sort".
  2. ^ Black, Paul E. "Dictionary of Algorithms and Data Structures". NIST. Retrieved 6 November 2015.

and 25 Related for: Pigeonhole sort information

Request time (Page generated in 0.7806 seconds.)

Pigeonhole sort

Last Update:

Pigeonhole sorting is a sorting algorithm that is suitable for sorting lists of elements where the number n of elements and the length N of the range of...

Word Count : 357

Pigeonhole

Last Update:

a pigeon coop Pigeonholing, classifying things into categories Pigeonhole principle, a mathematical principle Pigeonhole sort, a sorting algorithm Pigeon-hole...

Word Count : 112

Bucket sort

Last Update:

different sorting algorithm, or by recursively applying the bucket sorting algorithm. It is a distribution sort, a generalization of pigeonhole sort that allows...

Word Count : 2190

Sorting algorithm

Last Update:

In computer science, a sorting algorithm is an algorithm that puts elements of a list into an order. The most frequently used orders are numerical order...

Word Count : 6394

Pigeonholing

Last Update:

Pigeonholing is a process that attempts to classify disparate entities into a limited number of categories (usually, mutually exclusive ones). The term...

Word Count : 383

Pigeonhole principle

Last Update:

In mathematics, the pigeonhole principle states that if n items are put into m containers, with n > m, then at least one container must contain more than...

Word Count : 4032

Integer sorting

Last Update:

sorted are. Integer sorting algorithms including pigeonhole sort, counting sort, and radix sort are widely used and practical. Other integer sorting algorithms...

Word Count : 4038

Bead sort

Last Update:

sort is implemented without a mechanism to assist in finding empty spaces below the beads, such as in software implementations. Like the Pigeonhole sort...

Word Count : 1081

Bucket queue

Last Update:

The bucket queue is the priority-queue analogue of pigeonhole sort (also called bucket sort), a sorting algorithm that places elements into buckets indexed...

Word Count : 3312

List of algorithms

Last Update:

create sorted output Counting sort Pigeonhole sort Postman sort: variant of Bucket sort which takes advantage of hierarchical structure Radix sort: sorts strings...

Word Count : 7843

Internal mail

Last Update:

tray of every desk and also the internal mail pigeonhole of every department The post room worker sorts the mail by department using the wallets on his...

Word Count : 987

Emily Blunt

Last Update:

Guardian observed her ability to not be pigeonholed into a type of role, and wrote that she "specialises in a sort of calculated understatement", praising...

Word Count : 7726

Strict Fibonacci heap

Last Update:

using auxiliary data structures to track violations, and applying the pigeonhole principle. Strict Fibonacci heaps were invented in 2012 by Gerth S. Brodal...

Word Count : 5818

John Tartaglia

Last Update:

of any sort." He considers "nothing more addictive than the sound of an audience laughing" and, regarding the possibility of being "pigeonholed" as a children's...

Word Count : 1428

Cabinet of curiosities

Last Update:

polished stone samples, doubtless marbles and jaspers or fitted with pigeonhole compartments for specimens. Below them, a range of cupboards contain specimen...

Word Count : 5180

Heresy

Last Update:

context of political theory. The term heresy is also used as an ideological pigeonhole for contemporary writers because, by definition, heresy depends on contrasts...

Word Count : 4600

List of herbaria

Last Update:

folders are then sorted by taxonomic family according to the standard system selected for use by the herbarium and placed into pigeonholes in herbarium cabinets...

Word Count : 392

Elephant 6

Last Update:

member Pat Noel said many bands were dismayed at how journalists would "pigeonhole" them to the collective. "We kind of made a conscious decision to distance...

Word Count : 2690

Galaxy Quest

Last Update:

got Howard thinking about how the other Star Trek actors had become pigeonholed in these roles since the cancellation of Star Trek, and he then came...

Word Count : 7765

Mila Kunis

Last Update:

range, which is perhaps surprising considering she has been thus far pigeonholed into more lightweight parts", and Colin Covert of the Star Tribune, who...

Word Count : 10107

Polyamory

Last Update:

demeaning to 'secondaries' and 'tertiaries', or as an undesirable form of pigeonholing, and so prefer not to classify their relationships in this way. Among...

Word Count : 13637

Enema of the State

Last Update:

as synthesized, manufactured pop only remotely resembling punk, and pigeonholed as a joke act due to the puerile slant of its singles and associating...

Word Count : 9622

Herbarium

Last Update:

folders are then sorted by taxonomic family according to the standard system selected for use by the herbarium and placed into pigeonholes in herbarium cabinets...

Word Count : 2000

Computability

Last Update:

there are ( n + 1 ) {\displaystyle (n+1)} 'a's and only n states by the pigeonhole principle. Call this state S, and further let d be the number of 'a's...

Word Count : 3293

Modern Family

Last Update:

television audience knows we're a diverse tribe, not easily pigeonholed. Modern Family endows us with a sort of comic banality. It's an odd kind of progress. But...

Word Count : 10267

PDF Search Engine © AllGlobal.net