Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: One works, the other doesn't? Date: Thu, 28 Nov 2019 15:47:52 -0800 Organization: A noiseless patient Spider Lines: 14 Message-ID: <86zhgf8swn.fsf@linuxsc.com> References: <0EgwF.8082$kt1.6599@fx46.iad> <87imnvj2v6.fsf@bsb.me.uk> <87y2wrgrr3.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="81b92e3fa8397acac1ab5cf195ff75cd"; logging-data="8012"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/k/THeOPFYhr3CgKop62RrhZzox59G+Vs=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:D4h1+SB0tcgvr/TOZ0Xn/zjHBbA= sha1:tlLUiHkRBtCULOjRV6EL3z0IpPw= Xref: csiph.com comp.lang.c:148201 jak writes: > Il 08/11/2019 01:02, Ben Bacarisse ha scritto: > >>> [...] >> >> A merge sort will be O(n log n) but an unbalanced tree can still be >> O(n^2). On average it will be better, but not in the worst case. > > Forgive me if I'm late. I have little free time for myself. > Now I have again changed the algorithm to a balanced AVL tree. If you have written C code for maintaining an AVL tree how about posting that?