page488.html

来自「Data Structures And Algorithms With Obje」· HTML 代码 · 共 41 行

HTML
41
字号
<HTML><HEAD><TITLE>Exchange 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="tex2html6784" HREF="page489.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html6782" HREF="page478.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html6776" HREF="page487.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A>  <A NAME="tex2html6786" HREF="page611.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="../icons/index_motif.gif"></A> <BR><HR><H1><A NAME="SECTION0015400000000000000000">Exchange Sorting</A></H1><P>The second class of sorting algorithm that we considercomprises algorithms that <em>sort by exchanging</em><A NAME=35164>&#160;</A><A NAME=35165>&#160;</A>pairs of items until the sequence is sorted.In general, an algorithm may exchange adjacent elementsas well as widely separated ones.<P>In fact, since the insertion sorts considered in the preceding sectionaccomplish the insertion by swapping adjacent elements,insertion sorting can be considered as a kind of exchange sort.The reason for creating a separate category for insertion sortsis that the essence of those algorithms is insertion into a sorted list.On the other hand, an exchange sort does not necessarily make use ofsuch a sorted list.<P><BR> <HR><UL> <LI> <A NAME="tex2html6787" HREF="page489.html#SECTION0015410000000000000000">Bubble Sort</A><LI> <A NAME="tex2html6788" HREF="page490.html#SECTION0015420000000000000000">Quicksort</A><LI> <A NAME="tex2html6789" HREF="page492.html#SECTION0015430000000000000000">Running Time Analysis</A><LI> <A NAME="tex2html6790" HREF="page495.html#SECTION0015440000000000000000">Average Running Time</A><LI> <A NAME="tex2html6791" HREF="page496.html#SECTION0015450000000000000000">Selecting the Pivot</A></UL><HR><A NAME="tex2html6784" HREF="page489.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html6782" HREF="page478.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html6776" HREF="page487.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A>  <A NAME="tex2html6786" 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 &#169; 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 + =
减小字号Ctrl + -
显示快捷键?