|
Posted by Oli Filth on 11/18/03 11:43
Oli Filth wrote:
> kanka wrote:
> > Here is my problem,
> >
> > I have a string like $numbers="12345";
> >
> > i wanna find out all possible (unique) combinations of each subs.
> > e.g. 1 - 2 - 3 - 4 - 5 - 12 - 13 - 14 - 15 - 23 - 24 - ..... - 234 -
> > 245 - .... - 12345
> > but not 11 - 22 - 21 - 32 - 321....
> >
>
> This sound like you want *permutations*, not *combinations*.
Oops, no, I misread. You do want combinations.
Still, it won't be hard to modify the code I posted to do combinations
instead.
--
Oli
Navigation:
[Reply to this message]
|