<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="rss.xsl" media="screen"?>
<rss version="2.0">
  <channel>
    <title>星辰.Net技术社区论坛 - 算法/数据结构</title>
    <link>http://www.netcsharp.cn/showforum-42.aspx</link>
    <description>Latest 20 threads</description>
    <copyright>Copyright (c) 星辰.Net技术社区论坛</copyright>
    <generator>Discuz!NT</generator>
    <pubDate>Fri, 21 Nov 2008 17:43:03 GMT</pubDate>
    <ttl>60</ttl>
    <item>
      <title>算法时间复杂度分析基础</title>
      <description><![CDATA[通常，对于一个给定的算法，我们要做两项分析。第一是从数学上证明算法的正确性，这一步主要用到形式化证明的方法及相关推理模式，如循环不变式、数学归纳法等。而在证明算法是正确的基础上，第二部就是分析算法的时间复杂度。算法的时间复杂度反映了程序执行时间随输入规模增长而增长的量级，在很大程度上能很好反映出算法的优劣与否。因此，作为程序员，掌握基本的算法时间复杂度分析方法是很有必要的。
      但是很多]]></description>
      <link>http://www.netcsharp.cn/showtopic-1673.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Fri, 14 Nov 2008 15:44:00 GMT</pubDate>
    </item>
    <item>
      <title>C#反转单向链表</title>
      <description><![CDATA[链表是指将若干个数据项按一定的规则连接起来的表，其中的数据项成为结点。链表是一种常见的重要的数据结构。它是动态地进行存储分配的一种结构。它可以根据需要开辟内存单元。链表有一个“头指针”变量，以head表示，它存放一个地址。该地址指向一个元素。链表中每一个元素称为“结点”，每个结点都应包括两个部分：一为用户需要用的实际数据，二为下一个结点的地址。因此，head指向第一个元素：第一个元素又指向第二个元]]></description>
      <link>http://www.netcsharp.cn/showtopic-1560.aspx</link>
      <category>算法/数据结构</category>
      <author>earth</author>
      <pubDate>Fri, 10 Oct 2008 14:45:00 GMT</pubDate>
    </item>
    <item>
      <title>C#实现工作日的计算(排班系统常用)</title>
      <description><![CDATA[一、先介绍一下自己的计算逻辑:
     1.初始化某一年中的所有周六和周日,比如初始化2008年的所有周六、周日，存入表ConfigDate中；
     2.添加周六、周日外的其它节假日，比如国庆节、五一节、元旦等至表ConfigDate中;
     3.查询某年某月中的所有节假日，并能对某一节假日进行设置其有效性，比如我某个周六加班，则设置该周六假日无效，实际上该天当计算的时候也是工]]></description>
      <link>http://www.netcsharp.cn/showtopic-1466.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Mon, 22 Sep 2008 20:32:00 GMT</pubDate>
    </item>
    <item>
      <title>C#用回溯法找出 n 个自然数中取 r 个数的全排列</title>
      <description><![CDATA[using System;

using System.Collections.Generic;

using System.Text;
namespace ExArrange

{

    class Arrange    
   {

        public void Arrange(int n, int r)

        {

         ......]]></description>
      <link>http://www.netcsharp.cn/showtopic-1428.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Sat, 13 Sep 2008 09:30:00 GMT</pubDate>
    </item>
    <item>
      <title>构建可反转排序的泛型字典类(6)--实现IDictionary接口中的Keys和Values属性</title>
      <description><![CDATA[现在我们可以着眼于IDictionary接口的实现。第4节中，专门针对这个接口做了一个最简化的例子，我们来回顾一下，它是怎么实现IDictionary接口中的Keys和Values属性的。
public ICollection Keys

    {   //返回所有键的集合

        get

        {   //把所有键的集合拷贝到新数组中并返回

     ]]></description>
      <link>http://www.netcsharp.cn/showtopic-1354.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Sun, 31 Aug 2008 01:47:00 GMT</pubDate>
    </item>
    <item>
      <title>C#用固定的字符集进行字符串加密的函数</title>
      <description><![CDATA[/**//// 
/// 加密字符串类
/// 
public static class Encrypt
{
    private const string mstr = &amp;quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz&amp;quot;;

    /**//// 
    /// 字......]]></description>
      <link>http://www.netcsharp.cn/showtopic-1350.aspx</link>
      <category>算法/数据结构</category>
      <author>kirayamato</author>
      <pubDate>Sat, 30 Aug 2008 11:34:00 GMT</pubDate>
    </item>
    <item>
      <title>C#--网页正文提取算法</title>
      <description><![CDATA[思路：
1、抓取远程网页源码，这里要实现自动判断网页编码，否则有可能抓到乱码。我是先看应答的http头的chareset，一般这个很准，但像csdn的新闻比较变态http应答的头里的chareset和网页的meta里声明的chareset不一致，所以我手工加了一下判断，如果不一致再在内存流里用网页声明的编码读取一遍源码
2、把网页分割成几大块。试用了一下tidy的.net包装及HtmlPars]]></description>
      <link>http://www.netcsharp.cn/showtopic-703.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Mon, 14 Apr 2008 19:21:00 GMT</pubDate>
    </item>
    <item>
      <title>Hash Table结构详解(2)</title>
      <description><![CDATA[上篇文章，我们知道了散列函数会使得 Key 发生碰撞冲突。
那么，.NET 的 Hashtable 类是如何解决该问题的呢？
很简单，探测。
我们首先利用散列函数 GetHashCode() 取得 Key 的散列值。为了保证该值在数组索引范围内，让其与数组大小求模。这样便得到了Key 对应的 Value 在数组内的实际位置，即 f(K) = (GetHashCode() &amp;amp; 0x7F]]></description>
      <link>http://www.netcsharp.cn/showtopic-1317.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Sun, 24 Aug 2008 10:48:00 GMT</pubDate>
    </item>
    <item>
      <title>优化递归算法效率</title>
      <description><![CDATA[函数递归调用是很常见的做法，但是它往往是低效的，本文探讨优化递归效率的思路。
1.尾递归转换成迭代
尾递归是一种简单的递归，它可以用迭代来代替 比如 求阶乘函数的递归表达int f(int n)

...{

    if(n&amp;lt;0)return 1;

    return n*f(n-1);

}可以转换成完全等价的循环迭代int f(int n)

...{
]]></description>
      <link>http://www.netcsharp.cn/showtopic-1312.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Sat, 23 Aug 2008 10:42:00 GMT</pubDate>
    </item>
    <item>
      <title>B树、B-树、B+树、B*树都是什么</title>
      <description><![CDATA[B树、B-树、B+树、B*树都是什么

 
B树
       即二叉搜索树：

1.所有非叶子结点至多拥有两个儿子（Left和Right）；

2.所有结点存储一个关键字；

3.非叶子结点的左指针指向小于其关键字的子树，右指针指向大于其关键字的子树；
       如：

       
http://p.blog.csdn.net/images/p_blog_cs]]></description>
      <link>http://www.netcsharp.cn/showtopic-1300.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Tue, 19 Aug 2008 11:10:00 GMT</pubDate>
    </item>
    <item>
      <title>C#压缩整数及其解压缩算法的实现</title>
      <description><![CDATA[压缩算法描述
当整数的大小在0x00000000 (00000000 0000000000000000 00000000B)到0x0000007F (00000000 00000000 0000000001111111B)之间时，采用1个字节存放整数值，该字节最高位为0。压缩后的值形如B。当整数的大小在0x00000080 (00000000 00000000 00000000 10000000]]></description>
      <link>http://www.netcsharp.cn/showtopic-1308.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Thu, 21 Aug 2008 22:24:00 GMT</pubDate>
    </item>
    <item>
      <title>C#实现等值线追踪算法</title>
      <description><![CDATA[先说一下等值线的形成，等值线的绘制是有两种方法的，一种就是完全测量，也就是在实际的施工中找到所有的等值点，标记上
x,y,value，还有一种就是按一定的方式用几个预测点来采用一些插值方法形成规则的网格，每一个网格点上都有着坐标和value,

也就是高程值，然后在用这些网格上的值来估计出等值点，显然用第一种方法是不好的，常常也是不切实际的；这样也就有了一系列
的等值线的追踪方法的形成；在]]></description>
      <link>http://www.netcsharp.cn/showtopic-1306.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Wed, 20 Aug 2008 18:31:00 GMT</pubDate>
    </item>
    <item>
      <title>使用快速傅里叶变换计算圆周率</title>
      <description><![CDATA[我们需要一个计算 π 的分析算法。有用的算法是二次收敛的，即每一次迭代使有效位数增加一倍。计算 π 的二次收敛算法是基于 ACM 法(算术几何平均法)。首先设置初始值为：
http://tex.72pines.com/latex.php?latex=$X_0=%5Csqrt%202$
http://tex.72pines.com/latex.php?latex=$%5Cpi_0=2%20%2B]]></description>
      <link>http://www.netcsharp.cn/showtopic-1271.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Wed, 30 Jul 2008 08:55:00 GMT</pubDate>
    </item>
    <item>
      <title>要求将若干石头分为两堆使其重量差最小</title>
      <description><![CDATA[You have a number of stones with known weights W1, …, Wn. Write a program that will rearrange the stones into two piles such that weight difference between the piles is minimal.

InputInput contains]]></description>
      <link>http://www.netcsharp.cn/showtopic-1260.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Sat, 26 Jul 2008 10:57:00 GMT</pubDate>
    </item>
    <item>
      <title>Hash Table结构详解(1)</title>
      <description><![CDATA[Hash table，国内相当一部分书籍将其直译为哈希表，但博主本人喜欢称其为散列表。
 散列表支持任何基于 Key-Value 对的插入，检索，删除操作。
 比如在 .NET 1.x 版本下，我们可以这样使用：namespace Lucifer.CSharp.Sample
{
    class Program
    {

        public static void M]]></description>
      <link>http://www.netcsharp.cn/showtopic-1254.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Wed, 23 Jul 2008 12:18:00 GMT</pubDate>
    </item>
    <item>
      <title>C#并发数据结构 : SpinWait</title>
      <description><![CDATA[老实说，没有哪个开发人员愿意在其编码时还要考虑线程同步。更糟糕的情况是，编写线程同步代码一点也不好玩。稍一不慎，就会导致共享资源状态不一致，从而引发程序未预期行为。此外，当我们添加线程同步代码时还会导致程序运行变慢，损害性能和可伸缩性。从这点上来看，线程同步简直一无是处。可惜，这也是现实生活中必要的一部分。尤其在多核CPU成为主流的今天。
考虑下这种情况：只有一个线程试图访问某个资源。在此种状况]]></description>
      <link>http://www.netcsharp.cn/showtopic-1253.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Wed, 23 Jul 2008 11:58:00 GMT</pubDate>
    </item>
    <item>
      <title>构建可反转排序的泛型字典类(5)--实现IEnumerable&amp;gt;接口</title>
      <description><![CDATA[我们先来看看ReversibleSortedList类的定义：
public class ReversibleSortedList&amp;lt;TKey, TValue&amp;gt; :

        IDictionary&amp;lt;TKey, TValue&amp;gt;, ICollection&amp;lt;KeyValuePair&amp;lt;TKey, TValue&amp;gt;&amp;gt;,

        IEn]]></description>
      <link>http://www.netcsharp.cn/showtopic-1249.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Tue, 22 Jul 2008 10:47:00 GMT</pubDate>
    </item>
    <item>
      <title>要求根据售票员所占比例范围计算叶卡特琳堡的最小总人口数</title>
      <description><![CDATA[BackgroundEveryonemaking translations from English to Russian knows an English phrase&amp;quot;Naked conductor runs along the bus&amp;quot;. It has two very differentmeanings.
ProblemEvery bus in the Ekateri]]></description>
      <link>http://www.netcsharp.cn/showtopic-1237.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Sat, 19 Jul 2008 09:58:00 GMT</pubDate>
    </item>
    <item>
      <title>C#实现AStar算法</title>
      <description><![CDATA[介绍:AStar算法是最短路径搜索的一种，类属于启发式搜索. :), 照搬。。。。
这东西还是有点麻烦的，请耐点心，有几个核心步骤需要解释清楚
公式:
F = G + H
G: 从现在访问这点到开始点的消耗
H: 从现在这点到结束点的估计消耗
F: 做判定访问优先级的依据
数据结构: 
1. Open, Close队列 
Open里保存已经打开但是并未访问的元素
2. FSco]]></description>
      <link>http://www.netcsharp.cn/showtopic-1226.aspx</link>
      <category>算法/数据结构</category>
      <author>star65225692</author>
      <pubDate>Tue, 15 Jul 2008 09:46:00 GMT</pubDate>
    </item>
    <item>
      <title>要求在 N 个正整数中找出其中若干个使得它们的和是 N 的倍数</title>
      <description><![CDATA[The input contains N natural (i.e. positive integer) numbers (N≤ 10000). Each of that numbers is not greater than 15000. This numbersare not necessarily different (so it may happen that two or more of]]></description>
      <link>http://www.netcsharp.cn/showtopic-1222.aspx</link>
      <category>算法/数据结构</category>
      <author>admin</author>
      <pubDate>Sat, 12 Jul 2008 12:47:00 GMT</pubDate>
    </item>
  </channel>
</rss>