Merged
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.
Collaborator
|
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. |
3 tasks
Collaborator
|
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.