> Roger Hui rhui000 at shaw.ca > Wed Sep 2 00:49:28 HKT 2009 > > I wonder: if you are going to use /:, why not just do /:~ > and be done with it? I think there is a way to make this problem meaningful without applying unnecessary limitations.
Here is corrected problem: Instead of sorting array you need to generate the sequence of swaps such that it you apply them (in the C. sense) to the array ther result will be sorted. If a is unsorted array and seq is sought sequense (<0,i0),(<1,i1),etc. then sa=. > ([ <....@c. >@])/ (|.seq),<a and (sa-:&(/:~) a) *. (sa-:/:~sa) evaluates to 1 nsg _________________________________________________________________ Ready for Fall shows? Use Bing to find helpful ratings and reviews on digital tv's. http://www.bing.com/shopping/search?q=digital+tv's&form=MSHNCB&publ=WLHMTAG&crea=TEXT_MSHNCB_Vertical_Shopping_DigitalTVs_1x1 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
