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: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Using Java Classes to Sort a Small Array Quickly Date: Sun, 11 Sep 2011 20:32:27 -0400 Organization: A noiseless patient Spider Lines: 20 Message-ID: References: <86c4a53b-1ca1-48a8-b954-c01bd449278a@s35g2000prm.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 12 Sep 2011 00:32:31 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="f8igmItKsWs6nM5YanFxAA"; logging-data="5353"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19rcwNpKoLezntxw/6sHA/7" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 In-Reply-To: Cancel-Lock: sha1:K8Qp/sjQKrr+aOglPE4E4agbX4c= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7847 On 9/11/2011 7:40 PM, Wanja Gayk wrote: > In article, esosman@ieee-dot-org.invalid > says... > >> Very nice! Would you care to try this approach on a shorter >> input array, like >> >> data = new int[] { Integer.MAX_VALUE }; >> >> This case should be quite simple, since the array is already sorted. >> Let us know how you make out, will you? > > I didn't say it works for any array out there, did I? Ah. Then I claim I can sort an array of integers in O(0) time. (And my claim is O(as worthwhile) as yours.) -- Eric Sosman esosman@ieee-dot-org.invalid