<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"><channel><title>MagicLen</title><link>https://magiclen.org/tag/counting-sort/feed</link><description>多元化原創文章，內容包羅萬象，有程式語言、網站應用、軟體介紹、硬體介紹、作業系統、旅行遊記、專題採訪、益智問題、文學創作，以及作者們的知識分享和作品分享。</description><language>zh-TW</language><lastBuildDate>Fri, 24 Apr 2026 11:38:04 +0000</lastBuildDate><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>8</sy:updateFrequency><sy:updateBase>1970-01-01T00:00+00:00</sy:updateBase><item><title>計數排序法(Counting Sort)，只需線性時間就能完成的超快排序法</title><link>https://magiclen.org/counting-sort</link><description><![CDATA[    <img src="https://magiclen.org/wp-content/uploads/2016/05/1463382782_icon_23_one_finger_double_tap-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2016/05/1463382782_icon_23_one_finger_double_tap-220x162.png 1x, https://magiclen.org/wp-content/uploads/2016/05/1463382782_icon_23_one_finger_double_tap-440x324.png 2x, https://magiclen.org/wp-content/uploads/2016/05/1463382782_icon_23_one_finger_double_tap-660x486.png 3x" alt="">
計數排序(Counting Sort)演算法是不需進行比較的排序演算法，顧名思義，它會去數元素的數量來進行排序。這種排序法只需要線性時間和空間的複雜度就可以完成排序，比時間複雜度為O(nlogn)的演算法還快，而且作法也不會太難。雖然如此，計數排序法是並不算是常見的排序演算法，因為它只能用來排序已知數值範圍的序列(由於要直接對應序列的索引值，所以這組數值通常會是一組整數)。舉例來說，已知序列中的每...]]></description><category>研究分享</category><category>Java</category><category>Rust</category><category>演算法</category><category>Go</category><category>JavaScript</category><category>Java</category><category>JavaScript</category><category>排序演算法</category><category>計數排序</category><category>Rust</category><category>TypeScript</category><category>Go</category><guid>https://magiclen.org/counting-sort</guid><pubDate>Sat, 21 Oct 2017 06:03:39 +0800</pubDate><dc:creator>Magic Len</dc:creator></item></channel></rss>