冬Blog

醉心技术、醉心生活
随笔 - 109, 文章 - 0, 评论 - 956, 阅读 - 32万
  博客园  :: 首页  :: 新随笔  :: 订阅 订阅  :: 管理

随笔分类 -  Algorithm

摘要:本品是基于CUnit编写的、纯C的数据结构(ADT)各种实现的单元测试。主治基础不牢,水品增长缓慢。建议配合严蔚敏《数据结构》(C语言、第二版)一起使用,效果更佳。 阅读全文

posted @ 2009-06-13 23:47 冬冬 阅读(1301) 评论(1) 推荐(0) 编辑

摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> 1 //================================================================= 2 // Name : 使用雅可比迭代法求解线... 阅读全文

posted @ 2007-10-24 09:12 冬冬 阅读(5539) 评论(13) 推荐(1) 编辑

摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> 1 //================================================================= 2 // Name : 基于分段的平行排序 ... 阅读全文

posted @ 2007-10-23 18:11 冬冬 阅读(1302) 评论(0) 推荐(0) 编辑

摘要:package DataStructures;public class QueueArray { static final int DEFAULT_CAPACITY = 10; private Object[] theArray; private int currentSize; private int front; private int back; /** ... 阅读全文

posted @ 2006-09-11 12:07 冬冬 阅读(598) 评论(0) 推荐(0) 编辑

摘要:主类 package DataStructures;public class ArrayStack { private Object[] theArray; private int topOfStack; static final int DEFAULT_CAPACITY = 10; /** *//** * Construct the stack. * ... 阅读全文

posted @ 2006-08-23 18:05 冬冬 阅读(818) 评论(3) 推荐(0) 编辑

摘要:主类 package DataStructures;public class LinkedStack { private ListNode topOfStack; public LinkedStack() { topOfStack = null; } public boolean IsFull() { return false; } ... 阅读全文

posted @ 2006-08-23 17:08 冬冬 阅读(661) 评论(0) 推荐(0) 编辑

摘要:结点类 package DataStructures;class CursorNode { // Friently data;accessible by other package routines Object element; int next; // Constructers CursorNode(Object theElement) { this... 阅读全文

posted @ 2006-08-20 21:26 冬冬 阅读(720) 评论(0) 推荐(0) 编辑

摘要:节点 package DataStructures;class ListNode { //Frientdly data;accessible by other package routines Object element; ListNode next; // Constructers ListNode(Object theElement) { ... 阅读全文

posted @ 2006-08-19 11:42 冬冬 阅读(762) 评论(1) 推荐(1) 编辑

摘要:package Chapter1;public class MaxSubSum { /** *//** * Cubic maximun contiguous susequence sum algorithm. */ public static int MaxSubSum1(int[] a) { int maxSum = 0; for (int... 阅读全文

posted @ 2006-08-17 17:38 冬冬 阅读(616) 评论(0) 推荐(0) 编辑

摘要:#include char InputString[100];char OutputString[100];int MarkArray[100];int StringLength;int Number;void processString(int cursor){ int i=0; if(cursor==StringLength) { puts(OutputStri... 阅读全文

posted @ 2006-08-16 17:05 冬冬 阅读(567) 评论(0) 推荐(0) 编辑

摘要:#include int getOneNumber(int number){ if(number==1) return 1; if(number==0) return 0; return number%2+getOneNumber(number/2);}int main(){ int inputNumber,oneNumber; scanf("%d",&inp... 阅读全文

posted @ 2006-08-16 16:01 冬冬 阅读(901) 评论(3) 推荐(0) 编辑

摘要:一直想学习算法,当然,算法这个东西,只看书是不行的,程序是写出来的,所以要找一个写程序的东西。现在大部分的算法还是用C语言描述的,也有部分是用Java描述的,但是似乎还没有C#版本的,VS.Net大概是不行了。用什么呢?TC似乎当仁不让,但是被VS.Net宠坏了的现在,再去用DOS下的老古董,实在是心有不甘。没有别的东西了吗?当然不是,Eclipse+CDT可以说是现在最好的C程开发环境! 阅读全文

posted @ 2006-08-12 22:26 冬冬 阅读(1888) 评论(8) 推荐(0) 编辑

摘要:帮人做的C程题 #include void process(int a[100]){ int i=999,b=0; for(i=999;i>0;i--) { if(a[i]>9) { b=a[i]/10; a[i]=a[i]%10; a[i-1]+=b; } }}vo... 阅读全文

posted @ 2006-07-17 22:20 冬冬 阅读(1018) 评论(0) 推荐(0) 编辑

摘要:编号:1C版本: #include long gcd(long a,long b){ long rem=0; while(b!=0) { rem=a%b; a=b; b=rem; } return a;}int main(){ long a=0,b=0; scanf("%ld,%ld",&a... 阅读全文

posted @ 2006-06-25 14:34 冬冬 阅读(579) 评论(0) 推荐(0) 编辑

摘要:给入一个字符串,对其中的数字求和。 阅读全文

posted @ 2006-06-12 12:32 冬冬 阅读(1603) 评论(8) 推荐(0) 编辑

点击右上角即可分享
微信分享提示