Randomize a List problem
|
04-25-2024, 04:50 PM
Post: #33
|
|||
|
|||
RE: Randomize a List problem
Coming back to this after rediscovering One Minute Marvels.
The original algorithm is basically this: Code: T = size of list Similarly, the second item can only move during the last or second-to-last iteration. It can move to position 3 or 4. And so on down the line. Here’s a table showing where the items can move to for a 9-item list. Each row represents the starting position of an item and each colunm is a possible ending positions: Code: 1 2 3 4 5 6 7 8 9 Only items 8 and 9 can land in all positions. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)