Skip to content

Conversation

@DimaPen
Copy link

@DimaPen DimaPen commented Nov 27, 2018

  1. Each time that the shuffle function is called a new Random instance is created. Such behavior is very CPU-usage intensive and is not recommended.
  2. For shuffling there is a better approach in the Collections.shuffle() method.
  3. List is a better option than array according to Effective Java 2nd Edition (Item 25).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant