-
Notifications
You must be signed in to change notification settings - Fork 243
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
Topic/sorting 721 #738
Topic/sorting 721 #738
Conversation
…o MergeSort.merge
…tent with the implementation of MergeSort and InsertionSort. The end parameter is now exclusive.
…arge random arrays.
Codecov Report
@@ Coverage Diff @@
## master #738 +/- ##
=========================================
+ Coverage 51.28% 51.4% +0.11%
=========================================
Files 196 196
Lines 11765 11774 +9
Branches 1615 1591 -24
=========================================
+ Hits 6034 6052 +18
+ Misses 5731 5722 -9
Continue to review full report at Codecov.
|
…ehavior. Adding more Scaladocs.
Beautiful PR! Thanks for the hard work; I've incorporated some of your notes in the future release notes. Love the complete tests in particular. |
Hi! If you'd like to see your real name in the CHANGES.md file, please make a PR towards it, I'd be happy to merge. |
This is intended to resolve Issue #721, which relates to inconsistencies across the implementations of MergeSort, InsertionSort, and QuickSort.
All these strategies operate in place on segments of arrays that start and end at specified indices. In the QuickSort implementation, the end index was inclusive, while it was exclusive in MergeSort and InsertionSort. This has been fixed in this changeset to make the end index exclusive in all three implementations, following the convention in the Java Collections library. Validity and boundary checks have been introduced for the various parameters. Unit tests have been written to document and test the new behavior.
The naming of the start and end indices has been made consistent.
Unit tests have been added for checking correctness, stability, edge cases, etc.
Scaladocs have been added for all the utility methods in the Sorting package.