Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: Sort char array
Date: Wed, 09 Oct 2019 01:48:39 -0700
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <86y2xu8ftk.fsf@linuxsc.com>
References: <9299cea0-72b9-4250-83a2-6148bf14f430@googlegroups.com> <7307d9de-6e06-42ba-935b-3127a4639b07@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader02.eternal-september.org; posting-host="c0077320ebba5bb8d2e49a5d4c287ef2"; logging-data="842"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18M+BTbMDUwuMkuvucPFUR9/vvHQ29zFT8="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:OpGV3uGZ246upd7Fgg901kw2v/8= sha1:EUU2rltD09EA3c2wIhtywAg5ZwY=
Xref: csiph.com comp.lang.c:146788
already5chosen@yahoo.com writes:
> On Sunday, October 6, 2019 at 2:25:12 PM UTC+3, Bonita Montero wrote:
>
>>> Correct. The algorithm is not similar to bublesort.
>>
>> The algorithm has N^2 complexity whereas bubblesort
>> has a worst-case of N^2/2 complexity.
>
> Wrong.
> Plain (non-osculating) bubblesort's worst-case == N^2 comparisons.
> Or, may be (N-1)^2, if one wants to win an argument.
I think you mean non-oscillating. AFAIK there are no
amorous bubblesorts.