"in" everywhere

"Jérôme M. Berger" jeberger at free.fr
Sat Oct 9 07:05:22 PDT 2010


Seth Hoenig wrote:
> 2010/10/8 "Jérôme M. Berger" <jeberger at free.fr>
> 
>> Steven Schveighoffer wrote:
>>> On Thu, 07 Oct 2010 16:23:47 -0400, Rainer Deyke <rainerd at eldwood.com>
>>> wrote:
>>>> I can't say I've ever cared about the big-O complexity of an operation.
>>> Then you don't understand how important it is.
>>         If big O complexity is so important, then why does everyone use
>> quicksort (which is O(n**2)) and not heap sort or merge sort (which
>> are O(n*log(n)))?
>>
>>                Jerome
> 
> Because on average quicksort is faster than heap sort, and uses much less
> space than merge sort. Also, trivial guards can be put in place to avoid
> running quicksort in a worst case (pre-sorted data) scenario.
> 
	I rest my case.

		Jerome
-- 
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20101009/fdf0e325/attachment.pgp>


More information about the Digitalmars-d mailing list