Skip to content

Conversation

Dima1247
Copy link
Contributor

Added Fisher-Yates Shuffle algorithm.
Added tests based on implementation in JavaScript repo.

  • I have performed a self-review of my code
  • My code follows the style guidelines of this project
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Comments in areas I changed are up to date
  • I have added comments to hard-to-understand areas of my code
  • I have made corresponding changes to the README.md

@Dima1247 Dima1247 requested a review from siriak as a code owner January 14, 2022 19:43
@Dima1247
Copy link
Contributor Author

Hi, created this PR just to provide an implementation of Fisher-Yates Shuffle on .NET.
Any suggestions are welcome 😉

@Dima1247
Copy link
Contributor Author

I'm not sure about directory in which I placed this algorithm. I can change it if it's wrong.

Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, could you put it in the Algorithms/Shufflers directory?

Fixed classes location, added FluentAssertions
@DPalaSS
Copy link
Contributor

DPalaSS commented Jan 23, 2022

Updated Fisher-Yates algorithm, please check)

@codecov
Copy link

codecov bot commented Jan 23, 2022

Codecov Report

Merging #281 (d6e7c2a) into master (c95d8aa) will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #281      +/-   ##
==========================================
+ Coverage   94.97%   95.03%   +0.06%     
==========================================
  Files         158      160       +2     
  Lines        7581     7678      +97     
==========================================
+ Hits         7200     7297      +97     
  Misses        381      381              
Impacted Files Coverage Δ
...hms/Problems/CoinChange/DynamicCoinChangeSolver.cs 100.00% <100.00%> (ø)
Algorithms/Shufflers/FisherYatesShuffler.cs 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c4a2639...d6e7c2a. Read the comment docs.

Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@siriak siriak merged commit 67abf36 into TheAlgorithms:master Jan 23, 2022
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.

3 participants