﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-JUST DO IT-随笔分类-结构和算法</title><link>http://www.cppblog.com/xmoss/category/11261.html</link><description>我之所以在这里，只是因为我想要在这里</description><language>zh-cn</language><lastBuildDate>Thu, 30 Jul 2009 05:26:29 GMT</lastBuildDate><pubDate>Thu, 30 Jul 2009 05:26:29 GMT</pubDate><ttl>60</ttl><item><title>希尔排序（Windows+VC6.0环境编译）</title><link>http://www.cppblog.com/xmoss/archive/2009/07/29/91641.html</link><dc:creator>xmoss</dc:creator><author>xmoss</author><pubDate>Wed, 29 Jul 2009 15:06:00 GMT</pubDate><guid>http://www.cppblog.com/xmoss/archive/2009/07/29/91641.html</guid><wfw:comment>http://www.cppblog.com/xmoss/comments/91641.html</wfw:comment><comments>http://www.cppblog.com/xmoss/archive/2009/07/29/91641.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/xmoss/comments/commentRss/91641.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/xmoss/services/trackbacks/91641.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 希尔排序实际上是一种分组插入排序，它的执行时间依赖于增量序列，而且是不稳定的。其基本思想是：先取一个小于n的整数d1作为第一个增量，把文件的全部记录分成d1个组。所有距离为dl的倍数的记录放在同一个组中。先在各组内进行直接插入排序；然后，取第二个增量d2<d1重复上述的分组和排序，直至所取的增量dt=1(dt<dt-l<…<d2<d1)，即所有记录放在同一组中进行直接插入排序为止。&nbsp;&nbsp;<a href='http://www.cppblog.com/xmoss/archive/2009/07/29/91641.html'>阅读全文</a><img src ="http://www.cppblog.com/xmoss/aggbug/91641.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/xmoss/" target="_blank">xmoss</a> 2009-07-29 23:06 <a href="http://www.cppblog.com/xmoss/archive/2009/07/29/91641.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>归并排序（Windows+VC6.0环境编译）</title><link>http://www.cppblog.com/xmoss/archive/2009/07/27/91398.html</link><dc:creator>xmoss</dc:creator><author>xmoss</author><pubDate>Mon, 27 Jul 2009 15:13:00 GMT</pubDate><guid>http://www.cppblog.com/xmoss/archive/2009/07/27/91398.html</guid><wfw:comment>http://www.cppblog.com/xmoss/comments/91398.html</wfw:comment><comments>http://www.cppblog.com/xmoss/archive/2009/07/27/91398.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/xmoss/comments/commentRss/91398.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/xmoss/services/trackbacks/91398.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 归并算法的核心操作就是将一维数组中前后相邻的两个两个有序序列合并成一个有序序列。合并算法也可以采用递归算法来实现，形式上较为简单,但实用性很差。合并算法的合并次数是一个非常重要的量,根据计算当数组中有3到4个元素时,合并次数是2次,当有5到8个元素时,合并次数是3次,当有9到16个元素时,合并次数是4次，按照这一规律,当有N个子序列时可以推断出合并的次数是X(2 >=N,符合此条件的最小那个X)。 &nbsp;&nbsp;<a href='http://www.cppblog.com/xmoss/archive/2009/07/27/91398.html'>阅读全文</a><img src ="http://www.cppblog.com/xmoss/aggbug/91398.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/xmoss/" target="_blank">xmoss</a> 2009-07-27 23:13 <a href="http://www.cppblog.com/xmoss/archive/2009/07/27/91398.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>快速排序（windows+VC6.0环境编译）</title><link>http://www.cppblog.com/xmoss/archive/2009/07/20/90684.html</link><dc:creator>xmoss</dc:creator><author>xmoss</author><pubDate>Mon, 20 Jul 2009 15:51:00 GMT</pubDate><guid>http://www.cppblog.com/xmoss/archive/2009/07/20/90684.html</guid><wfw:comment>http://www.cppblog.com/xmoss/comments/90684.html</wfw:comment><comments>http://www.cppblog.com/xmoss/archive/2009/07/20/90684.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/xmoss/comments/commentRss/90684.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/xmoss/services/trackbacks/90684.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 在当前无序区R[1..H]中任取一个数据元素作为比较的"基准"(不妨记为X)，用此基准将当前无序区划分为左右两个较小的无序区：R[1..I-1]和R[I+1..H]，且左边的无序子区中数据元素均小于等于基准元素，右边的无序子区中数据元素均大于等于基准元素，而基准X则位于最终排序的位置上，即R[1..I-1]≤X.Key≤R[I+1..H](1≤I≤H)，当R[1..I-1]和R[I+1..H]均非空时，分别对它们进行上述的划分过程，直至所有无序子区中的数据元素均已排序为止。&nbsp;&nbsp;<a href='http://www.cppblog.com/xmoss/archive/2009/07/20/90684.html'>阅读全文</a><img src ="http://www.cppblog.com/xmoss/aggbug/90684.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/xmoss/" target="_blank">xmoss</a> 2009-07-20 23:51 <a href="http://www.cppblog.com/xmoss/archive/2009/07/20/90684.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>冒泡排序（Windows+VC6.0环境编译）</title><link>http://www.cppblog.com/xmoss/archive/2009/07/20/90683.html</link><dc:creator>xmoss</dc:creator><author>xmoss</author><pubDate>Mon, 20 Jul 2009 15:50:00 GMT</pubDate><guid>http://www.cppblog.com/xmoss/archive/2009/07/20/90683.html</guid><wfw:comment>http://www.cppblog.com/xmoss/comments/90683.html</wfw:comment><comments>http://www.cppblog.com/xmoss/archive/2009/07/20/90683.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/xmoss/comments/commentRss/90683.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/xmoss/services/trackbacks/90683.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 两两比较待排序数据元素的大小，发现两个数据元素的次序相反时即进行交换，直到没有反序的数据元素为止。&nbsp;&nbsp;<a href='http://www.cppblog.com/xmoss/archive/2009/07/20/90683.html'>阅读全文</a><img src ="http://www.cppblog.com/xmoss/aggbug/90683.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/xmoss/" target="_blank">xmoss</a> 2009-07-20 23:50 <a href="http://www.cppblog.com/xmoss/archive/2009/07/20/90683.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>插入排序（Windows+VC6.0环境编译）</title><link>http://www.cppblog.com/xmoss/archive/2009/07/20/90682.html</link><dc:creator>xmoss</dc:creator><author>xmoss</author><pubDate>Mon, 20 Jul 2009 15:48:00 GMT</pubDate><guid>http://www.cppblog.com/xmoss/archive/2009/07/20/90682.html</guid><wfw:comment>http://www.cppblog.com/xmoss/comments/90682.html</wfw:comment><comments>http://www.cppblog.com/xmoss/archive/2009/07/20/90682.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/xmoss/comments/commentRss/90682.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/xmoss/services/trackbacks/90682.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 每次将一个待排序的数据元素，插入到前面已经排好序的数列中的适当位置，使数列依然有序；直到待排序数据元素全部插入完为止。&nbsp;&nbsp;<a href='http://www.cppblog.com/xmoss/archive/2009/07/20/90682.html'>阅读全文</a><img src ="http://www.cppblog.com/xmoss/aggbug/90682.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/xmoss/" target="_blank">xmoss</a> 2009-07-20 23:48 <a href="http://www.cppblog.com/xmoss/archive/2009/07/20/90682.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>选择排序（Windows+VC6.0环境编译）</title><link>http://www.cppblog.com/xmoss/archive/2009/07/20/90681.html</link><dc:creator>xmoss</dc:creator><author>xmoss</author><pubDate>Mon, 20 Jul 2009 15:46:00 GMT</pubDate><guid>http://www.cppblog.com/xmoss/archive/2009/07/20/90681.html</guid><wfw:comment>http://www.cppblog.com/xmoss/comments/90681.html</wfw:comment><comments>http://www.cppblog.com/xmoss/archive/2009/07/20/90681.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/xmoss/comments/commentRss/90681.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/xmoss/services/trackbacks/90681.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 每一趟从待排序的数据元素中选出最小（或最大）的一个元素，顺序放在已排好序的数列的最后，直到全部待排序的数据元素排完。&nbsp;&nbsp;<a href='http://www.cppblog.com/xmoss/archive/2009/07/20/90681.html'>阅读全文</a><img src ="http://www.cppblog.com/xmoss/aggbug/90681.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/xmoss/" target="_blank">xmoss</a> 2009-07-20 23:46 <a href="http://www.cppblog.com/xmoss/archive/2009/07/20/90681.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>