From 625217a9c241e5a115bdb5726261f67e3b903a0d Mon Sep 17 00:00:00 2001 From: Oleksii Trekhleb Date: Tue, 29 May 2018 11:19:08 +0300 Subject: [PATCH] Code style fixes. --- src/algorithms/sorting/radix-sort/RadixSort.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/algorithms/sorting/radix-sort/RadixSort.js b/src/algorithms/sorting/radix-sort/RadixSort.js index 8adff9392..c97664df5 100644 --- a/src/algorithms/sorting/radix-sort/RadixSort.js +++ b/src/algorithms/sorting/radix-sort/RadixSort.js @@ -2,7 +2,7 @@ import Sort from '../Sort'; // Using charCode (a = 97, b = 98, etc), we can map characters to buckets from 0 - 25 const BASE_CHAR_CODE = 97; -const NUMBER_OF_DIGITS = 10; +const NUMBER_OF_POSSIBLE_DIGITS = 10; const ENGLISH_ALPHABET_LENGTH = 26; export default class RadixSort extends Sort { @@ -40,7 +40,7 @@ export default class RadixSort extends Sort { // See below. These are used to determine which digit to use for bucket allocation const modded = 10 ** (index + 1); const divided = 10 ** index; - const buckets = this.createBuckets(NUMBER_OF_DIGITS); + const buckets = this.createBuckets(NUMBER_OF_POSSIBLE_DIGITS); array.forEach((element) => { this.callbacks.visitingCallback(element);