I do not know if this is an "improvement" but here is another
approach;
repair=: ] C.~ _2 (([EMAIL PROTECTED]: /:~)\ # (<\ [EMAIL PROTECTED])) ]
bubsort=: repair @ ({. , [EMAIL PROTECTED])^:_
bubsort C
0 0 2 4 4 5 6 7 9 9Actually, I am not totally sure if this counts as bubble sort -- it's the same basic principle but slightly more parallel. -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
