Sorting algorithms

Era Scarecrow rtcvb32 at yahoo.com
Mon Oct 15 04:04:48 PDT 2012


On Monday, 15 October 2012 at 09:18:12 UTC, Era Scarecrow wrote:
> So an example area to be sorted with 16 elements would take on 
> average about 100 compares while theoretically you can do it in 
> half that number.

  Correction. 16 numbers would be solved in about 49 compares 
while an optimal sorting takes about 45. And for 21 numbers about 
74 compares while optimally about 63.

  These numbers don't seem that large, but at the same time they 
do.


More information about the Digitalmars-d-learn mailing list