Bubblesort is fun If you have lots of lines and use only 0 and 1 it flows like bubbles to the top. Show the results after each trip and wait a second
2008/4/28 Devon McCormick <[EMAIL PROTECTED]>: > The usual improvement is to use something more efficient than bubblesort. > Nonetheless, it's a nifty implementation. > > On 4/28/08, Oleg Kobchenko <[EMAIL PROTECTED]> wrote: > > > > I wanted to model bubble sort. > > Here's a first shot. Any improvements? > > > > ]C=. 10 [EMAIL PROTECTED] 10 > > 6 5 9 2 4 9 0 7 0 4 > > /:~ C > > 0 0 2 4 4 5 6 7 9 9 > > <./ C > > 0 > > (([ ,`(,~)@.> [EMAIL PROTECTED]) , [EMAIL PROTECTED])/ C > > 0 6 5 9 2 4 9 0 7 4 > > (([ ,`(,~)@.> [EMAIL PROTECTED]) , [EMAIL PROTECTED])/^:_ C > > 0 0 2 4 4 5 6 7 9 9 > > > > > > > > > > > > > ____________________________________________________________________________________ > > Be a better friend, newshound, and > > know-it-all with Yahoo! Mobile. Try it now. > > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > -- > Devon McCormick, CFA > ^me^ at acm. > org is my > preferred e-mail > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Björn Helgason, Verkfræðingur Fugl&Fiskur ehf, Fornustekkum II, 781 Hornafirði Po Box 127,801 Selfoss , t-póst: [EMAIL PROTECTED] gsm: +3546985532 Landslags og skrúðgarðagerð, gröfuþjónusta http://groups.google.com/group/J-Programming Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans góður kennari getur stigið á tær án þess að glansinn fari af skónum /|_ .-----------------------------------. ,' .\ / | Með léttri lund verður | ,--' _,' | Dagurinn í dag | / / | Enn betri en gærdagurinn | ( -. | `-----------------------------------' | ) | (\_ _/) (`-. '--.) (='.'=) `. )----' (")_(")
---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
