02-25-2010, 10:06 PM
Here's another challenge. the challenge this time is to create a script/program (any language) that will randomize the contence of an array without using external libries. This must work by:
Post you code and explain how it works.
Code:
new_array = [1, 2, 3, 4, 5]
new_array.randomize! #This will randomize everything e.g new_array now = [3, 1, 5, 4, 2]
Post you code and explain how it works.