Skip to content

refactor ShuffleArray: improve documentation and maintainability - #6357

Merged
DenizAltunkapan merged 1 commit into
TheAlgorithms:masterfrom
alxkm:refactor/shuffle
Jul 9, 2025
Merged

refactor ShuffleArray: improve documentation and maintainability#6357
DenizAltunkapan merged 1 commit into
TheAlgorithms:masterfrom
alxkm:refactor/shuffle

Conversation

@alxkm

@alxkm alxkm commented Jul 8, 2025

Copy link
Copy Markdown
Member

Changes Introduced:

  • Refactored ShuffleArray to ensure clarity, maintainability.
  • Improved JavaDocs. Clear explanation of the Fisher–Yates shuffle algorithm.
  • In-place shuffle logic preserved, but made more readable and self-documenting.
  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

@codecov-commenter

codecov-commenter commented Jul 8, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.60%. Comparing base (4768987) to head (7f0c25e).
⚠️ Report is 379 commits behind head on master.

Files with missing lines Patch % Lines
...main/java/com/thealgorithms/misc/ShuffleArray.java 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6357      +/-   ##
============================================
- Coverage     74.61%   74.60%   -0.02%     
- Complexity     5448     5450       +2     
============================================
  Files           682      682              
  Lines         19017    19022       +5     
  Branches       3677     3677              
============================================
+ Hits          14190    14191       +1     
- Misses         4269     4271       +2     
- Partials        558      560       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Oska-r Oska-r left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Seem like reasonable changes.

@DenizAltunkapan
DenizAltunkapan merged commit c997a32 into TheAlgorithms:master Jul 9, 2025
6 of 7 checks passed
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.

4 participants