Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing array with list. #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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