Skip to content

Commit 5eca6f2

Browse files
committedJan 26, 2018
[Sorting and Searching Algorithms]
1 parent b68ac1f commit 5eca6f2

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed
 

‎src/js/algorithms/sorting/radix-sort.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { findMaxValue, findMinValue } from '../search/min-max-search';
22

3-
const getBucketIndex = (value, minValue, significantDigit, radixBase) => {
4-
return Math.floor(((value - minValue) / significantDigit) % radixBase);
5-
};
3+
const getBucketIndex = (value, minValue, significantDigit, radixBase) =>
4+
Math.floor(((value - minValue) / significantDigit) % radixBase);
65

76
const countingSortForRadix = (array, radixBase, significantDigit, minValue) => {
87
let bucketsIndex;

‎src/js/util.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ export const Compare = {
66

77
export const DOES_NOT_EXIST = -1;
88

9-
export function lesserOrEquals(a, b, compareFn) {
9+
export function lesserEquals(a, b, compareFn) {
1010
const comp = compareFn(a, b);
1111
return comp === Compare.LESS_THAN || comp === Compare.EQUALS;
1212
}
1313

14-
export function biggerOrEquals(a, b, compareFn) {
14+
export function biggerEquals(a, b, compareFn) {
1515
const comp = compareFn(a, b);
1616
return comp === Compare.BIGGER_THAN || comp === Compare.EQUALS;
1717
}

0 commit comments

Comments
 (0)
Please sign in to comment.