We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent caec97e commit 625217aCopy full SHA for 625217a
src/algorithms/sorting/radix-sort/RadixSort.js
@@ -2,7 +2,7 @@ import Sort from '../Sort';
2
3
// Using charCode (a = 97, b = 98, etc), we can map characters to buckets from 0 - 25
4
const BASE_CHAR_CODE = 97;
5
-const NUMBER_OF_DIGITS = 10;
+const NUMBER_OF_POSSIBLE_DIGITS = 10;
6
const ENGLISH_ALPHABET_LENGTH = 26;
7
8
export default class RadixSort extends Sort {
@@ -40,7 +40,7 @@ export default class RadixSort extends Sort {
40
// See below. These are used to determine which digit to use for bucket allocation
41
const modded = 10 ** (index + 1);
42
const divided = 10 ** index;
43
- const buckets = this.createBuckets(NUMBER_OF_DIGITS);
+ const buckets = this.createBuckets(NUMBER_OF_POSSIBLE_DIGITS);
44
45
array.forEach((element) => {
46
this.callbacks.visitingCallback(element);
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments