
读书
文章平均质量分 78
gpcuster
http://bbs.data-works.org/
展开
-
时空权衡:利用额外的空间提高字符串匹配的速度
1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace StringFinder 6{ 7 class Program 8 { 9 static void Main(string[] args) 1原创 2007-11-27 08:41:00 · 694 阅读 · 0 评论 -
求解2个数的最大公约数 和 求解质因数
1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace GCD 6{ 7 class Program 8 { 9 static void Main(string[] args) 10原创 2007-11-04 09:42:00 · 554 阅读 · 0 评论 -
分治法:用C#实现归并排序
根据《算法设计与分析基础》中对归并排序的描述,写了一分C#代码实现。具体的实现代码如下: 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace MergeSort 6{ 7 class Program 8 {原创 2007-11-12 14:42:00 · 599 阅读 · 0 评论 -
减治法:C#实现插入排序
1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace InsertionSort 6{ 7 class Program 8 { 9 static void Main(string[] args)10原创 2007-11-14 17:42:00 · 614 阅读 · 0 评论 -
编程实现1到N个数的所有排列组合
编程实现1到N个数的所有排列组合。如:n = 3则得到的序列如下:123, 132, 213, 231, 312, 321我的实现如下,大家看看如何: 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace ConsoleAppl原创 2007-11-17 21:41:00 · 1900 阅读 · 1 评论 -
如何高效求2个整数的乘积。
利用减治法的思想来实现,将2个整数相乘只需要进行简单的加法和位运算。实现如下: 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace ConsoleApplication43 6{ 7 class Program 8 {原创 2007-11-21 15:41:00 · 411 阅读 · 0 评论 -
《Head First HTML with CSS and XHTML》 读后感
《Head First HTML with CSS and XHTML》读后感花了整整2个星期的时间,终于把O’Reilly出版社出版的《 Head First HTML with CSS and XHTML》欣赏完了。这是一本思想非常超前的书籍,也是Head First系列书籍的特点。不得不承认,网络在计算机中的地位已经是不可取代了。如果你是学习计算机的专业人原创 2007-12-16 22:41:00 · 692 阅读 · 0 评论 -
如何高效地判断奇数和偶数
在我们日常的编程当中,常常会遇到判断某个整数属于奇数还是偶数的情况。大家一般的处理做法是用这个整数和2取模。然后判断是等于1还是等于0。这里,我要为大家介绍一种快速有效的判断做法,利用2进制进行判断。大家都知道,奇数的最低位一定是1,而偶数的最低位一定是0.所以我们可以根据这个特性,让需要判定的整数和1进行“与”运算,这样就只留下了原数的最低位,然后直接判断这个数原创 2007-11-21 14:41:00 · 626 阅读 · 0 评论 -
变治法:用C#实现堆的建立与堆排序
1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace Heap 6{ 7 class Program 8 { 9 static void Main(string[] args) 10原创 2007-11-24 13:41:00 · 563 阅读 · 0 评论 -
动态规划:利用WarShell算法求有向图的传递闭包
1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace ConsoleApplication47 6{ 7 class Program 8 { 9 static void Main(string[] a原创 2007-11-27 19:41:00 · 617 阅读 · 0 评论 -
C#实现遗传算法,模拟花朵的进化。
以下代码实现了一个简单的花朵进化的模拟过程。花朵的种群数量是10,共进化了50代。通过运行程序,你会发现通过不断的进化,种群的总的适应环境的能力在逐步提高(fitness的值下降)。实现代码:using System;using System.Collections.Generic;using System.Text;namespace GA原创 2008-01-09 14:40:00 · 562 阅读 · 0 评论 -
《SQL Server 2005 编程入门经典》 Chapter 1
本章全面而简单地介绍了SQL Server 2005的基本内容。对我印象最深的是对系统数据库(System Databases)的介绍。让我对这方面有了一个大概的了解。 1 distribution这个数据库好像是负责发布功能的,具体是做什么的书上也没有做介绍,原创 2007-05-19 12:43:00 · 419 阅读 · 0 评论 -
今天突然理解了“volatile”
首先咱们可以看一下MSDN对volatile的定义:The volatile keyword indicates that a field can be modified in the program by something such as the operating system, the hardware, or a concurrently executing thread.原创 2007-11-12 12:42:00 · 345 阅读 · 0 评论 -
分治法:用C#实现快速排序
1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace QuickSort 6{ 7 class Program 8 { 9 static void Main(string[] args) 1原创 2007-11-13 13:42:00 · 470 阅读 · 0 评论