DS-Algo-Point icon indicating copy to clipboard operation
DS-Algo-Point copied to clipboard

Fisher-Yates Shuffle

Open RohanK6 opened this issue 4 years ago • 4 comments

🚀 Feature

(Write down a clear and concise description of what the feature is.)

I would like to do this in Java The Fisher–Yates shuffle is an algorithm for generating a random permutation of a finite sequence—in plain terms, the algorithm shuffles the sequence. The algorithm effectively puts all the elements into a hat; it continually determines the next element by randomly drawing an element from the hat until no elements remain. The algorithm produces an unbiased permutation: every permutation is equally likely.

Have you read the Contribution Guidelines?

Yes

Pitch

The modern version of the algorithm is efficient: it takes time proportional to the number of items being shuffled and shuffles them in place. It is important to know.

Assignees

@RohanK6 - Java

RohanK6 avatar Oct 11 '20 08:10 RohanK6

@RohanK6 - Java Assigned

sukritishah15 avatar Oct 11 '20 08:10 sukritishah15

I can implement the javascript version of the Fisher Yates Shuffle if needed

itslinotlie avatar Oct 11 '20 23:10 itslinotlie

Please assign this to me for it's Python solution

arsh9806 avatar Oct 12 '20 09:10 arsh9806

I can also do the C++ implementation as well

itslinotlie avatar Oct 14 '20 15:10 itslinotlie