Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Computer Science · Glosarium

Apa itu Counting sort, radix sort?

Dikenal juga sebagai: counting sort · radix sort

Definition 19.10 University Computer Science — Year 1 · Bab 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.
Baca dalam konteks →