in reply to Re: Random Derangement Of An Array
in thread Random Derangement Of An Array
For instance, I think one that it wouldn't be able to get is: (4,3,2,1). In the last step, you must swap the 4 into its final position, so the 4 would have to be swapped with the 1 in the first position. But the 1 would definitely no longer be in the first position at that time.
blokhead
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Random Derangement Of An Array
by jethro (Monsignor) on Jul 06, 2008 at 12:46 UTC |