<?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/%e6%8a%98%e5%8d%8a%e6%9f%a5%e6%89%be/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/7.html</link>
		<comments>http://www.juliuschen.com/archives/7.html#comments</comments>
		<pubDate>Wed, 09 Dec 2009 15:38:02 +0000</pubDate>
		<dc:creator>Julius Chen</dc:creator>
				<category><![CDATA[Search]]></category>
		<category><![CDATA[二分查找]]></category>
		<category><![CDATA[折半查找]]></category>
		<category><![CDATA[查找算法]]></category>

		<guid isPermaLink="false">http://www.juliuschen.com/archives/7</guid>
		<description><![CDATA[折半查找（二分查找）是一种简单而又高效的查找算法，其查找长度至多为㏒2n+1（判定树的深度），平均查找长度为㏒2(n+1)-1，效率比顺序查找要高，但折半查找只能适用于顺序存储有序表（如对线性链表就无法有效地进行折半查找）。 折半查找的C/C++代码实现： int binary_search(int search_table[], int length, int key) { &#160; &#160; int&#160;low = 0; &#160; &#160; int&#160;high = length - 1; &#160; &#160; while&#160;(low &#60;= high) { &#160; &#160; &#160; &#160; int&#160;mid = (low + high) / 2; &#160; &#160; &#160; &#160; if&#160;(key == search_table[mid]) &#160; &#160; &#160; &#160; &#160; &#160; return&#160;mid; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://www.juliuschen.com/archives/7.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 -->
