[Jprogramming] Permutations
Roger Hui
rhui000 at shaw.ca
Thu Sep 29 22:14:45 HKT 2011
> Should a space make a difference ever?
All the time, Linda. For example:
123456 vs. 1234 56
average vs. aver age
----- Original Message -----
From: Linda Alvord <lindaalvord at verizon.net>
Date: Thursday, September 29, 2011 2:46
Subject: Re: [Jprogramming] Permutations
To: 'Programming forum' <programming at jsoftware.com>
> The only difference between the correct and the incorrect result
> is a space
> before the second : . Should a space
> make a difference ever? In the
> correct result I can't understand what it is, what it does and
> why it does
> it.
>
> /:~ :/:@": &.>a,b
> ------T-----┐
> │01123│01123│
> L-----+------
>
>
> /:~:([:/:": )&.>a,b
> 0 1
>
> Since I set out originally to remove "atop", how can I do it?
>
> /:~ :([: /: ":)&.>a,b
> ------T-----┐
> │10123│32110│
> L-----+------
>
> Hope you can help. Thanks. Linda
>
> -----Original Message-----
> From: programming-bounces at jsoftware.com
> [mailto:programming-bounces at jsoftware.com] On Behalf Of Ian Clark
> Sent: Thursday, September 22, 2011 9:13 PM
> To: Programming forum
> Subject: Re: [Jprogramming] Permutations
>
> 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
> <purpleblues13 at googlemail.com> 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.
More information about the Programming
mailing list