Skip to content

Commit

Permalink
fix quickSort Hoare partition w/ Mid pivot
Browse files Browse the repository at this point in the history
  • Loading branch information
clarketm committed Jul 23, 2018
1 parent d16e877 commit f4f4916
Show file tree
Hide file tree
Showing 8 changed files with 1,465 additions and 927 deletions.
6 changes: 4 additions & 2 deletions dist/super.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,9 @@ function partitionHoare(arr, low, high, pivotType, compare) {

case PivotType.MID:
default:
pivot = Math.trunc((low + high) / 2);
var mid = Math.trunc((low + high) / 2);
swap(arr, mid, low);
pivot = low;
break;
}

Expand Down Expand Up @@ -4626,7 +4628,7 @@ var Trie = function () {
return Trie;
}();

var version = "0.0.13";
var version = "0.0.14";

var Super = {
version: version,
Expand Down
6 changes: 4 additions & 2 deletions dist/super.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,9 @@

case PivotType.MID:
default:
pivot = Math.trunc((low + high) / 2);
var mid = Math.trunc((low + high) / 2);
swap(arr, mid, low);
pivot = low;
break;
}

Expand Down Expand Up @@ -4632,7 +4634,7 @@
return Trie;
}();

var version = "0.0.13";
var version = "0.0.14";

var Super = {
version: version,
Expand Down
4 changes: 2 additions & 2 deletions dist/super.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit f4f4916

Please sign in to comment.