本文へスキップ

リソース · ガイド・記事

Radix Sort

キーを1桁ずつ振り分ける比較を使わないソートである基数ソートを扱い、O(n log n) のソートより速くなるのはどんな場合かを丁寧に検討しています。

確認日

元のサイトを開く: Radix Sort (元のサイトを新しいタブで開きます)

ロードマップに追加

取り組んでいるロードマップにこのリソースを追加できます。自分用の追加リソースとして表示され、ロードマップの手順は変わらず、記録した手順数にも数えられません。

出典コンテンツの言語:英語

Read this in other languages: Português, In computer science, radix sort is a non-comparative integer sorting algorithm that sorts data with integer keys by grouping keys by the individual digits which share the same significant position and value. A positional notation is required, but because integers can represent strings of characters (e.g., names or dates) and specially formatted floating point numbers, radix sort is not limited to integers. In mathematical numeral systems, the radix or base is the number of unique digits, including the digit zero, used to represent numbers in a positional numeral system. For example, a binary system (using numbers 0 and 1) has a radix of 2 and a decimal system (using numbers 0 to 9) has a radix of 10.

PrepKit の概要

この概要は PrepKit 編集部がソースリポジトリをもとに執筆・確認したもので、リソース本文の引用ではありません。

対象
ソースにレベルの記載はありません
形式
リファレンス

扱っている内容

  • 名前の由来:radix は記数法の基数を指します。
  • 効率の節:O(wn) のコストと、w を常に定数として扱えるとは限らない理由。
  • 計算量の表:時間 n * k、メモリ n + k、安定。k は最も長いキーの長さです。

使い方

PrepKit の学習アドバイスであり、ソースの主張ではありません。

非負整数向けに最下位桁からの基数ソートを実装し、ご自身の入力にとって w と k が何を意味するかを説明してください。

範囲と制約

画像1枚以外に手順ごとの説明はなく、負の数の扱いも演習もありません。ポルトガル語版へのリンクがあります。

利用方法と形式

GitHub の英語 README で、無料で読めます。MIT ライセンスの trekhleb/javascript-algorithms リポジトリにあります。

PrepKit が 2026/10/02 に確認しました。 リソースの出典のコミット: 85293e3e2b88

この概要の根拠
  • src/algorithms/sorting/radix-sort/README.md

この項目を掲載しているページ

PrepKit ニュースレターを受け取る

任意です。PrepKit の利用には必要ありません。

メールアドレスの取り扱いについて