A sort is a process that rearranges the records of a file
into a sequence that is sorted on some key. Sorting organizes
a collection of data into either ascending or descending
order (Yedidjah and Aaron, 2003; Frank, 2004).
Sorting can be categorized into two categories internal sorting requires that the collection of data fit entirely in
the computer’s main memory while in external sorting,
the data collectively will not fit in the computer’s main
memory all at once but must reside in auxiliary storage
such as disk (Yedidjah and Aaron, 2003; Frank, 2004;
Shola, 2003). Sorting algorithms for serial computers
(random access machines or RAMs) allow only one
operation to be executed at a time. In sorting algorithms
based on a comparison network model of computation,
many comparison operations can be performed
simultaneously. Comparison networks differ from RAM’s
in two important aspects. First, they can only perform
comparisons. Second, unlike the RAM model in which
operations occur serially, that is, one after another,
operations in a comparison network may occur the same
time or “in parallel”.