(嗯,我想知道为什么它叫做比较()而不是比较()。 历史原因,我想。) - Keith Thompson(The_Other_Keith) ks***@mib.org < http: //www.ghoti.net/~kst> 圣地亚哥超级计算机中心< *< http://users.sdsc.edu/~kst> " ;我们必须做点什么。这是事情。因此,我们必须这样做。 - Antony Jay和Jonathan Lynn,是部长 There are variants of Quicksort that are stable (at some cost inspeed). Note that there is no implication in the standard that qsort() is animplementation of the Quicksort algorithm; it could even be Bubblesortor Bogosort in a sufficiently perverse implementation. You canreasonably expect qsort() to use an O(n log n) algorithm. (If you''recurious, you can even investigate its internal behavior by addingtracing code to your compar() routine.) (Hmm, I wonder why it''s called compar() rather than compare().Historical reasons, I suppose.) --Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>"We must do something. This is something. Therefore, we must do this."-- Antony Jay and Jonathan Lynn, "Yes Minister" 这篇关于关于qsort库函数的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-15 06:04