[futurebasic] Permutation Challenge

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2000 : Group Archive : Group : All Groups

From: Phil Yates <phil.yates@...>
Date: Sun, 26 Nov 2000 22:49:45 +0000
I've been trying to come up with an efficient function which will create a
series of strings, each of which contains the numbers 0 - 9 in all possible
permutations. The only proviso is that no number must be repeated in the
string - every digit must be unique.

DIM 10 String$(3628800)

String$(n) = "0123456789"

The function I've written is incredibly verbose and clunky, and I wondered
if any of you mathematicians could come up with a small, efficient one.

Phil