Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
skozlov committed Aug 17, 2024
1 parent 9dcb752 commit 4604ebb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ import scala.math.Ordered.orderingToOrdered
* @see
* [[https://en.wikipedia.org/wiki/Merge_sort]]
*/
class MergeSort[A](val smallChunkSize: Int, val smallChunkSort: FunctionalSort[A]) {
// noinspection ScalaWeakerAccess
class MergeSort[A](val smallChunkSize: Int = 5, val smallChunkSort: FunctionalSort[A] = InsertionSort()) {
require(smallChunkSize >= 0, "Negative smallChunkSize: " + smallChunkSize)

@tailrec
final def merge(
in1: Slice[A],
Expand Down

0 comments on commit 4604ebb

Please sign in to comment.