📄 page511.html
字号:
<HTML><HEAD><TITLE>Distribution Sorting</TITLE></HEAD><BODY bgcolor="#FFFFFF"> <a href="../index.html" target="_top"><img src="../icons/usins.gif" alt="Logo" align=right></a><b>Data Structures and Algorithms with Object-Oriented Design Patterns in Python</b><br><A NAME="tex2html7040" HREF="page512.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html7038" HREF="page478.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html7032" HREF="page510.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A> <A NAME="tex2html7042" HREF="page611.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="../icons/index_motif.gif"></A> <BR><HR><H1><A NAME="SECTION0015800000000000000000">Distribution Sorting</A></H1><P>The final class of sorting algorithm considered in this chapterconsists of algorithms that sort <em>by distribution</em><A NAME=44994> </A><A NAME=44995> </A>.The unique characteristic of a distribution sorting algorithmis that it does <em>not</em> make use of comparisons to do the sorting.<P>Instead, distribution sorting algorithms rely on <em>a priori</em>knowledge about the universal setfrom which the elements to be sorted are drawn.For example, if we know <em>a priori</em> that the size of the universeis a small, fixed constant, say <I>m</I>,then we can use the bucket sorting algorithmdescribed in Section <A HREF="page512.html#secsortingbucket"><IMG ALIGN=BOTTOM ALT="gif" SRC="../icons/cross_ref_motif.gif"></A>.<P>Similarly, if we have a universe the elements of which can be representedwith a small, finite number of bits (or even digits, letters, or symbols),then we can use the radix sorting algorithm given in Section <A HREF="page514.html#secsortingradix"><IMG ALIGN=BOTTOM ALT="gif" SRC="../icons/cross_ref_motif.gif"></A>.<P><BR> <HR><UL> <LI> <A NAME="tex2html7043" HREF="page512.html#SECTION0015810000000000000000">Bucket Sort</A><LI> <A NAME="tex2html7044" HREF="page514.html#SECTION0015820000000000000000">Radix Sort</A></UL><HR><A NAME="tex2html7040" HREF="page512.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html7038" HREF="page478.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html7032" HREF="page510.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A> <A NAME="tex2html7042" HREF="page611.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="../icons/index_motif.gif"></A> <P><ADDRESS><img src="../icons/bruno.gif" alt="Bruno" align=right><a href="../copyright.html">Copyright © 2003</a> by <a href="../signature.html">Bruno R. Preiss, P.Eng.</a> All rights reserved.</ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -