Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Gene Wirchenko Newsgroups: comp.lang.java.programmer Subject: Re: Using Java Classes to Sort a Small Array Quickly Date: Tue, 13 Sep 2011 09:48:18 -0700 Organization: A noiseless patient Spider Lines: 30 Message-ID: <042v67d77hp7rf5alv25djn00nvaoi2jot@4ax.com> References: <86c4a53b-1ca1-48a8-b954-c01bd449278a@s35g2000prm.googlegroups.com> <4e6e8f47$0$308$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: mx04.eternal-september.org; posting-host="7Qrvczazr82YckO5XW8Vtw"; logging-data="16621"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+t2nKCMIYxlO+aRbD/kEkPm0hDFdCKD2I=" X-Newsreader: Forte Agent 4.2/32.1118 Cancel-Lock: sha1:d8KjHg3ezH1q/8HN1g4+8lJQJL0= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7977 On Mon, 12 Sep 2011 19:01:26 -0400, Arne Vajhøj wrote: >On 9/12/2011 1:57 PM, Gene Wirchenko wrote: >> On Mon, 12 Sep 2011 01:40:50 +0200, Wanja Gayk >> wrote: [snip] >>> I didn't say it works for any array out there, did I? >> >> You did. Claiming an algorithm is O(n) means claiming that that >> is the upper bound. > >No - big O for algorithms is usual average case not worst case. Nope. It is abused for that. >I am sure you can find plenty of quotes for quicksort being >O(nlogn) and not O(n^2). And that is an example of the abuse. Quicksort is nearly O(n log n), but technically, it is O(n squared). I am sure that I can find plenty of quotes for the moon being made of green cheese, too. Sincerely, Gene Wirchenko