Radix Sort — JavaScript implementation

  • Given a list of numbers
  • Find the maximum length among all numbers, that is, the largest number’s length
  • Start a loop from 0 up to the maximum length
    - i means the i-th position counting from the right
    - In each iteration, we sort the numbers by the digit at the specified i position.





Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

State Management in React without Redux / Mobx.

Anki for music

Node.js Application Troubleshooting Manual — Correctly Enabling Chrome DevTools

Introduction to HTML Space Notation nbsp; ensp; emsp;

Getting Started with Node.JS on Alibaba Cloud

HTTP vs WebSockets

How I built my portfolio using NextJS, Typescript, and Chakra UI

Why Angular Sucks

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adela Chao

Adela Chao

More from Medium

Quick Sort — Javascript implementation

Find the minimum and maximum elements in an array

Searching Array

Leetcode Series. No 098: Validate Binary Search Tree