上一页 1 ··· 6 7 8 9 10
摘要: Hanoi tower运用递归算法。几年前没能了解其中的真正奥妙,想通了其实很简单,呵呵参见了《数据结构及算法分析 JAVA版》思路:1 设计disk和pole类,其中pole类类似于栈(先入后出)2 利用递归算法得出移动disk的先后顺序以及移动路线,并将每一步操作信息保存至链表中3 将链表中保存的结果打印出来以下是汉诺塔中定义的类:HanoiType.h代码 Code highlighting... 阅读全文
posted @ 2010-03-23 09:57 wlu 阅读(304) 评论(0) 推荐(0)
摘要: 专心致志。非凡的人生源于专注。做事三心二意,会耗费一个人75%以上的精力。很多人不知道如何清除杂念,因为他们从未想过换种方式生活。看看周围那些令你羡慕的人的生活吧!看自己能从他们身上学到些什么?向他们请教,寻求专注的方式,把精力集中到真正重要的事情上。 阅读全文
posted @ 2010-03-21 21:19 wlu 阅读(202) 评论(0) 推荐(0)
摘要: p people sitting around a table and count from1 to m. the one counts m will be kickedout, output the order of them.代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHigh... 阅读全文
posted @ 2010-03-21 20:37 wlu 阅读(241) 评论(0) 推荐(0)
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1#include<stdio.h>2#include<iostream>3usingnamespacestd;45template<typenameT>6clas... 阅读全文
posted @ 2010-03-19 13:40 wlu 阅读(404) 评论(0) 推荐(0)
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#include<stdio.h>#include<stdlib.h>#ifdef_DEBUG#defineDEBUG_NEWnew(_NORMAL_BLOCK,THIS_FI... 阅读全文
posted @ 2010-01-12 20:46 wlu 阅读(288) 评论(0) 推荐(0)
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#include<iostream>usingnamespacestd;classstudent{public:voiddisplay();voidset_id(int_id);voids... 阅读全文
posted @ 2010-01-12 09:53 wlu 阅读(209) 评论(0) 推荐(0)
摘要: 代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#include<iostream>usingnamespacestd;intmain(){intf=0,i=5,j=5,k;intA[26][26];for(k=1;k<=25;... 阅读全文
posted @ 2010-01-11 21:48 wlu 阅读(317) 评论(0) 推荐(0)
摘要: 《算法导论》2.3-7很值得一练。其中用到了归并排序、二分查找等等:Give a Q(n lg n) time algorithm for determining if there exist two elements in an set S whose sum is exactly some value x.以下是答案,其实想想很简单的。代码如下,以备日后查找:)代码Code highlight... 阅读全文
posted @ 2010-01-04 10:42 wlu 阅读(397) 评论(0) 推荐(0)
摘要: 最近开始学习asp.net,感觉与asp.net相关的、需掌握的基础很多很多。我是信息工程的学生,对实现算法比较熟悉,但是对asp.net,sql之类的可以说是一窍不通。一个朋友向我分析了一下,觉得对创业者来说,纯软件的编程实际上是成本低、收益最大的选择,所以我很想学习asp.net。Anyway,在一年之后我将要准备找工作了,不知是有幸还是不幸,我的两个选择:电子信息工程和计算机技术都受到了金融... 阅读全文
posted @ 2009-06-22 21:26 wlu 阅读(224) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10