I cheated... (-:/sort@":each) f. -:/ /:~ :/:@":&.>
On Fri, Sep 23, 2011 at 1:37 PM, Johann Hibschman <[email protected]> wrote: > Why did you use (/:~ : /:) rather than just (/:~)? I'd forgotten about > the monad/dyad use of (:), so it took me a little while to parse that. > > Ian Clark <[email protected]> writes: > >> Off-the-cuff... >> >> a=: 10123 >> b=: 32110 >> c=: 32100 >> -:/ /:~ :/:@":&.> a,b >> 1 >> -:/ /:~ :/:@":&.> a,c >> 0 >> >> >> On Thu, Sep 22, 2011 at 10:41 PM, David Vaughan >> <[email protected]> wrote: >>> Hi, what is the best (fastest) way to check whether a number is a >>> permutation of another number? >>> I've tried listing all permutations of one number and checking whether the >>> other number is in the list of permutations. This seems pretty slow, so I >>> was hoping for a faster method. >>> >>> Thanks. >>> ---------------------------------------------------------------------- >>> For information about J forums see http://www.jsoftware.com/forums.htm >>> >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
