Thread
:
What's the most efficent way to randomize a Queue?
View Single Post
•
•
Join Date: Sep 2008
Posts: 1,658
Reputation:
Solved Threads: 206
BestJewSinceJC
Offline
Posting Virtuoso
Re: What's the most efficent way to randomize a Queue?
0
#
4
Nov 12th, 2008
My point is that its not a queue, then. Just take an ArrayList, use int index = Math.Random(n) where n is the # of items in your ArrayList, then index is the random index you want.
BestJewSinceJC
View Public Profile
Find all posts by BestJewSinceJC