Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Mr. Man-wai Chang" Newsgroups: comp.lang.javascript Subject: Re: Bubblesort Date: Fri, 4 Mar 2016 18:53:20 +0800 Organization: Hung Hom, Kowloon, Hong Kong Lines: 15 Message-ID: References: <0d68ee6d-8a80-439e-ae04-17743584e2e4@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 4 Mar 2016 10:50:17 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="d8506d156af3d0cd28ee33da089db589"; logging-data="15821"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/eh+rT1SwQvFSGP+EobLqB" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: <0d68ee6d-8a80-439e-ae04-17743584e2e4@googlegroups.com> Cancel-Lock: sha1:lA2ZFcxwsYhLVYxayUvkkAt9m9g= Xref: csiph.com comp.lang.javascript:29794 On 3/4/2016 6:00 PM, jonas.thornvall@gmail.com wrote: > I was thinking sorting links for each node, using a simple bubblesort, it is not that many links on each node usually. A link can't be equal to another so no "=" needed. > arr[i] contain the nodes and nodelinks[] is an array of links 1,4,2,3,0 for example. > > Does it seem in principal right? Does Javascript have a function to sort arrays? -- @~@ Remain silent. Nothing from soldiers and magicians is real! / v \ Simplicity is Beauty! May the Force and farces be with you! /( _ )\ (Fedora release 23) Linux 4.4.3-300.fc23.x86_64 ^ ^ 18:42:01 up 16:51 0 users load average: 1.04 1.04 1.05 不借貸! 不詐騙! 不援交! 不打交! 不打劫! 不自殺! 請考慮綜援 (CSSA): http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa