From: robin on
"mohangupta13" <mohangupta13(a)gmail.com> wrote in message
news:76f0b4d1-8880-48ee-84a4-5c946f6c423c(a)z13g2000prh.googlegroups.com...
| Hello all ,
|
| I am afraid that most of the times books on algorithms just explain
| their operations and not their practical applicability much.
| Now as i read we have largely 3 linear time sorting algorithms

"Internal Sorting Methods illustrated with PL/I Programs",
by R. P. Rich covers quite a lot of sorting methods.

As for how they are used, that depends on the kinds
of values being sorted -- such as integer, floating-point, character, etc,
as well as the quantity of values being sorted, and whether the sort
needs to be "stable"..

Hash sort is the most linear for floating point and character.
Hash sort and other sorts are applicable to integer values,
and the choice depends on other factors such as whether there are duplicate
values, how many values, whether the sort must be "stable", etc etc etc.


From: glen herrmannsfeldt on
In comp.lang.pl1 robin <robin51(a)dodo.com.au> wrote:
> "mohangupta13" <mohangupta13(a)gmail.com> wrote in message
> news:76f0b4d1-8880-48ee-84a4-5c946f6c423c(a)z13g2000prh.googlegroups.com...
> | Hello all ,

> | I am afraid that most of the times books on algorithms just explain
> | their operations and not their practical applicability much.
> | Now as i read we have largely 3 linear time sorting algorithms

> "Internal Sorting Methods illustrated with PL/I Programs",
> by R. P. Rich covers quite a lot of sorting methods.

> As for how they are used, that depends on the kinds
> of values being sorted -- such as integer, floating-point, character, etc,
> as well as the quantity of values being sorted, and whether the sort
> needs to be "stable"..

There has been much discussion about radix sort being linear.

The complication is that radix sort is linear in the number
of items, but also proportional to the size of the data items.

Consider, for example, sorting a large (limit as N goes to infinity)
list of 8 bit integers. The fastest way is likely to count how
many there are of each value, and then generate the appropriate
output list. Otherwise, the size of the items to be sorted
tends to increase as log(N).

-- glen