全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Counting sort, radix sort?

又称: counting sort · radix sort

Definition 19.10 University Computer Science — Year 1 · 第 19 章 — Sorting

Counting sort sorts nn keys in {0,…,k−1}\{0, \dots, k - 1\} by counting the keys of each value, computing from the counts where each value’s block starts, and copying each key to the next free cell of its block, in input order. Radix sort, least significant digit first, sorts keys of dd digits by dd passes of a stable sort on one digit, from the last digit to the first.

The passes of . The arrows follow 457 and 355 into the pass on the tens: equal digits, so the stable pass leaves them in the order the units gave them.
The passes of Output 19.5. The arrows follow 457 and 355 into the pass on the tens: equal digits, so the stable pass leaves them in the order the units gave them.
An IBM 82 card sorter at the Computer History Museum. The row of pockets along the front received the cards, one pocket per row of the card. Photograph: leighklotz, CC BY 2.0.
An IBM 82 card sorter at the Computer History Museum. The row of pockets along the front received the cards, one pocket per row of the card. Photograph: leighklotz, CC BY 2.0.
在原文中阅读 →