Skip to content

refactor: cleanup BucketSort #5314

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

Merged
merged 5 commits into from
Aug 10, 2024
Merged

refactor: cleanup BucketSort #5314

merged 5 commits into from
Aug 10, 2024

Conversation

alxkm
Copy link
Contributor

@alxkm alxkm commented Aug 10, 2024

Refactoring of BucketSort

Several improvements have been made:

  1. Comment Refinement: Redundant comments were removed, and relevant descriptions were moved directly into method-level documentation.

  2. Main Method Removal: The main method was removed as it was redundant. Testing can be effectively handled through the provided unit tests, or by writing a simple test case if needed.

  3. Additional Unit Tests: New unit tests were added.

  4. Stream API Usage: During refactoring Java Streams were introduced to simplify and modernize the code.

  • 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
Copy link

codecov-commenter commented Aug 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.10%. Comparing base (7a5fe92) to head (92c792d).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5314      +/-   ##
============================================
+ Coverage     42.05%   42.10%   +0.05%     
- Complexity     2613     2619       +6     
============================================
  Files           522      522              
  Lines         15565    15565              
  Branches       2969     2964       -5     
============================================
+ Hits           6546     6554       +8     
+ Misses         8722     8715       -7     
+ Partials        297      296       -1     

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

@alxkm alxkm changed the title refactor: refactoring BucketSort implementation, adding more tests refactor: cleanup BucketSort Aug 10, 2024
@alxkm alxkm requested a review from siriak August 10, 2024 09:30
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, thanks!

@siriak siriak merged commit 1977188 into TheAlgorithms:master Aug 10, 2024
5 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.

3 participants