<?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; Search</title>
	<atom:link href="http://www.juliuschen.com/archives/category/algorithm/search/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>
		<item>
		<title>顺序查找</title>
		<link>http://www.juliuschen.com/archives/6.html</link>
		<comments>http://www.juliuschen.com/archives/6.html#comments</comments>
		<pubDate>Tue, 08 Dec 2009 15:36:58 +0000</pubDate>
		<dc:creator>Julius Chen</dc:creator>
				<category><![CDATA[Search]]></category>
		<category><![CDATA[查找算法]]></category>
		<category><![CDATA[顺序查找]]></category>

		<guid isPermaLink="false">http://www.juliuschen.com/archives/6</guid>
		<description><![CDATA[顺序查找（Sequential Search）算法简单，适用面广（对查找表结构无任何要求），但其查找效率较低，等概率下平均查找长度为(n+1)/2。 在条件允许情况下，顺序查找可以设置一个监视哨，目的在于免去查找过程中每一步都要检测整个表是否查找完毕。严版《数据结构》说这个改进能使查找长度在≥1000时查找所需平均时间几乎减少一半。 顺序查找的C/C++代码实现： int seq_search(int search_table[], int length, int key) { &#160; &#160; int&#160;i; &#160; &#160; search_table[0] = key; &#160; &#160; for&#160;(i = length; key != search_table[i]; --i); &#160; &#160; return&#160;i; } 第4行即为设置监视哨，当然监视哨也可以设在高下标处。]]></description>
		<wfw:commentRss>http://www.juliuschen.com/archives/6.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>查找表</title>
		<link>http://www.juliuschen.com/archives/5.html</link>
		<comments>http://www.juliuschen.com/archives/5.html#comments</comments>
		<pubDate>Mon, 07 Dec 2009 15:51:17 +0000</pubDate>
		<dc:creator>Julius Chen</dc:creator>
				<category><![CDATA[Search]]></category>
		<category><![CDATA[哈希表]]></category>
		<category><![CDATA[查找表]]></category>

		<guid isPermaLink="false">http://www.juliuschen.com/?p=5</guid>
		<description><![CDATA[查找表（Search Table）是一种在实际应用中大量使用的数据结构。查找表分为静态查找表和动态查找表，静态查找表只进行查找操作，动态查找表则在查找的同时还进行插入或删除操作。 静态查找表主要是：顺序表、线性链表、索引顺序表等。 动态查找表主要是：二叉排序树、平衡二叉树、B-树、B+树等。 哈希表 根据设定的哈希函数H(key)和处理冲突的方法将一组关键字映像到一个有限的连续的地址集（区间）上，并以关键字在地址集中的“像”作为记录在表中的存储位置，这种表就叫哈希表。 哈希函数的构造方法： 1. 直接定址法 H(key) = key 或 H(key) = a * key + b 2. 除留余数法 H(key) = key % p, p ≤ length （一般情况下，p为质数或不包含]]></description>
		<wfw:commentRss>http://www.juliuschen.com/archives/5.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 -->
