Kumar-laxmi / Algorithms

A Repository for algorithms in C, C++, Python and Java
Apache License 2.0
311 stars 364 forks source link

ADD: Fisher-Yates Shuffle in C , C++ ,Python #1093

Closed shravanii2308 closed 1 year ago

shravanii2308 commented 1 year ago

Is your feature request related to a problem? Please describe. The Fisher-Yates shuffle, also known as the Knuth shuffle, is an algorithm used to randomly shuffle or permute the elements of an array or a list. It provides an unbiased and efficient way to generate a random permutation of the elements.

Describe the solution you'd like The Fisher-Yates shuffle ensures that every possible permutation of the elements is equally likely to occur. It has a time complexity of O(n), where n is the number of elements in the array or list, making it efficient for shuffling large collections. i can code this in c,c++, python

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context please assign me this issue @Kumar-laxmi

Kumar-laxmi commented 1 year ago

Assigned! @shravanii2308 : C, C++, Java & Python