Hi,
I created a general list, having as a data member a pointer to the first node, and then linking all other nodes to the first node. My simulation program requires the list to be shuffled. I wonder if anyone can suggest (or even provide the code) how I might rearrange the contents of the list in a random fashion?
I would be extremely grateful for all help.
I created a general list, having as a data member a pointer to the first node, and then linking all other nodes to the first node. My simulation program requires the list to be shuffled. I wonder if anyone can suggest (or even provide the code) how I might rearrange the contents of the list in a random fashion?
I would be extremely grateful for all help.