Comments

  1. F, Rosenek:

    Thanks for the information on the topic, saved me some time.
    Below i attached an idea for an improvement.

    List tmp = Arrays.asList(array);
    Collections.shuffle(tmp);
    array = (E[]) tmp.toArray();

    Have a nice day,
    F. Rosenek

    March 13, 2012 at 12:36 pm |
  2. […] I know that Collections.shuffle() is well distributed: see for instance http://blog.ryanrampersad.com/2012/03/03/more-on-shuffling-an-array-correctly/ […]

    March 14, 2012 at 7:11 am |

Leave a Reply

You must be logged in to post a comment.