GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Code style fixes. · BrandonWeb/javascript-algorithms@625217a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/algorithms/sorting/radix-sort
    • RadixSort.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: src/algorithms/sorting/radix-sort/RadixSort.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Sort from '../Sort';
22

33
// Using charCode (a = 97, b = 98, etc), we can map characters to buckets from 0 - 25
44
const BASE_CHAR_CODE = 97;
5-
const NUMBER_OF_DIGITS = 10;
5+
const NUMBER_OF_POSSIBLE_DIGITS = 10;
66
const ENGLISH_ALPHABET_LENGTH = 26;
77

88
export default class RadixSort extends Sort {
@@ -40,7 +40,7 @@ export default class RadixSort extends Sort {
4040
// See below. These are used to determine which digit to use for bucket allocation
4141
const modded = 10 ** (index + 1);
4242
const divided = 10 ** index;
43-
const buckets = this.createBuckets(NUMBER_OF_DIGITS);
43+
const buckets = this.createBuckets(NUMBER_OF_POSSIBLE_DIGITS);
4444

4545
array.forEach((element) => {
4646
this.callbacks.visitingCallback(element);

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.