The COBOL language has a SORT verb which interfaces very well with the
DFSORT and Syncsort product. Just as a curiosity, I was wondering if there
is any need for a standardized C interface, along the lines of the qsort()
run time subroutine.

As an aside, does anybody know why C included qsort() and no other sort
algorithm? qsort() is O(n log n) in general, but  is O(n^2) in degenerate
cases (already sorted). I might like an hsort() to implement heap sort
which is O(n log n) in all cases. But wouldn't a bsort(), bubble sort, be
useful to sort a small amount of data?

Would it be "worth while" to bother writing some code for CBT distribution
which implements the above interface to DFSORT, and maybe even includes an
hsort() and bsort()? Or is C just not the language for this sort (pun
intended) of processing?

-- 
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to