<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>一花一世界 &#187; 交换排序</title>
	<atom:link href="http://www.juliuschen.com/archives/tag/%e4%ba%a4%e6%8d%a2%e6%8e%92%e5%ba%8f/feed" rel="self" type="application/rss+xml" />
	<link>http://www.juliuschen.com</link>
	<description>谈笑间，樯橹灰飞烟灭</description>
	<lastBuildDate>Sun, 29 Aug 2010 10:32:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>快速排序</title>
		<link>http://www.juliuschen.com/archives/11.html</link>
		<comments>http://www.juliuschen.com/archives/11.html#comments</comments>
		<pubDate>Sun, 20 Dec 2009 07:50:37 +0000</pubDate>
		<dc:creator>Julius Chen</dc:creator>
				<category><![CDATA[Sorting]]></category>
		<category><![CDATA[交换排序]]></category>
		<category><![CDATA[快速排序]]></category>
		<category><![CDATA[排序算法]]></category>

		<guid isPermaLink="false">http://www.juliuschen.com/archives/11</guid>
		<description><![CDATA[快速排序是应用最广泛的排序算法，也是目前认为最好的一种内部排序方法（就平均时间而言）。它采用分治（divide-and-conquer）的策略，通过一趟排序将待排记录分割成独立的两个部分，使其中的一部分记录关键字均比另一部分记录关键字小（大），然后分别对两个部分继续进行排序，以达到整个序列有序。 快速排序的C/C++代码实现： int partition(int sort_array[], int low, int high) { &#160; &#160; int&#160;pivotkey = sort_array[low]; &#160; &#160; while&#160;(low &#60; high) { &#160; &#160; &#160; &#160; while&#160;(low &#60; high &#38;&#38; pivotkey &#60;= sort_array[high]) --high; &#160; &#160; &#160; &#160; sort_array[low] = sort_array[high]; &#160; &#160; &#160; &#160; while&#160;(low &#60; high &#38;&#38; pivotkey &#62;= sort_array[low]) ++low; &#160; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://www.juliuschen.com/archives/11.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>简单排序方法</title>
		<link>http://www.juliuschen.com/archives/9.html</link>
		<comments>http://www.juliuschen.com/archives/9.html#comments</comments>
		<pubDate>Mon, 14 Dec 2009 15:03:55 +0000</pubDate>
		<dc:creator>Julius Chen</dc:creator>
				<category><![CDATA[Sorting]]></category>
		<category><![CDATA[交换排序]]></category>
		<category><![CDATA[冒泡排序]]></category>
		<category><![CDATA[排序算法]]></category>
		<category><![CDATA[插入排序]]></category>
		<category><![CDATA[直接插入排序]]></category>
		<category><![CDATA[简单选择排序]]></category>
		<category><![CDATA[选择排序]]></category>

		<guid isPermaLink="false">http://www.juliuschen.com/archives/9</guid>
		<description><![CDATA[简单的排序方法主要是指直接插入排序、冒泡排序和简单选择排序。他们都是稳定的排序方法，平均时间复杂度都为O(n2)，并且空间复杂度都为O(1)。 直接插入排序 直接插入排序（Straight Insertion Sort）是一种最简单的排序方法，它的基本操作是将一个记录插入到已排好序的有序表中，从而得到一个新的、记录数增1的有序表。直接插入排序的运行时间和数据原始排列顺序密切相关。对于已经排好序（或已几乎排好序）的数据，插入排序的效率会比较高。 直接插入排序的C/C++代码实现： void insert_sort(int sort_array[], int length) { &#160; &#160; int&#160;i, j; &#160; &#160; for&#160;(i = 2; i &#60; length; ++i) &#160; &#160; &#160; &#160; if&#160;(sort_array[i] &#60; sort_array[i-1]) { &#160; &#160; &#160; &#160; &#160; &#160; sort_array[0] = sort_array[i]; &#160; &#160; &#160; &#160; &#160; &#160; sort_array[i] = sort_array[i-1]; &#160; &#160; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://www.juliuschen.com/archives/9.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->
