资源 · 指南或文章
Radix Sort
基数排序是一种逐位对键分组的非比较排序,页面仔细讨论了它何时能胜过 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 对你的输入分别意味着什么。
范围与局限
除一张图片外没有逐步讲解,没有处理负数,也没有练习。附有葡萄牙文版本的链接。
获取方式与形式
GitHub 上的英文 README;免费;采用 MIT 许可的 trekhleb/javascript-algorithms。
PrepKit 于 2026年10月2日 审核。 资源来源提交: 85293e3e2b88
本概览的依据
- src/algorithms/sorting/radix-sort/README.md
收录此条目的页面
订阅 PrepKit 通讯
可选。使用 PrepKit 并不需要订阅。