上一页 1 ··· 4 5 6 7 8 9 下一页
摘要: 2010-6-2 (一) #include stdio.h int ival = -1; int main() { printf("%d\n", ::ival); // 全局 printf("%d\n", ival); // 依然是全局 int ival = 1; // 局部变量 printf("%d\n", ival++); // 打印的是局部 ival = 1; printf("%d, %d, %d\n", ival, ival++, ival++); //printf 1 1 1 printf("%d\n", ival); //3 ival = 1; printf("%d, 阅读全文
posted @ 2010-12-24 12:54 wlu 阅读(431) 评论(0) 推荐(0) 编辑
摘要: 算法设计技术 2010年10月3日星期日 20:53 #include stdio.h #include memory // 编程珠玑问题算法 typedefstruct { intst, ed, val; }M; voidsetM(M &m, int s, int e, int v) { m.st = s; m.ed = e; m.val = v; } voidcpyM(M &des, M &src) { des.st = src.st; des.ed = src.ed; des.val = src.val; } // 迭代算法,算法复杂度为O(N) 阅读全文
posted @ 2010-12-24 12:21 wlu 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 微软:操作系统:程序的优化考虑的因素,数据库知识,协议(ping属于ICMP),最大堆中元素的删除中兴:数据库知识,操作系统,进程与线程的区别,协议(http,汇聚层的功能),网络(网桥,路由器等相关的)java(抽象类,GC)bigendia和littleendia (大端、小端(正常的顺序))int a = 0X123;char t[] = (char*)&a;big endia001... 阅读全文
posted @ 2010-05-29 21:33 wlu 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 幻 方(Magic Square) 不存在 2 階幻方只有一個 3 階幻方四階幻方 歐拉幻方四階幻方富蘭克林幻方完美四階幻方參考資料1.The Nature of Mathematics2.Professor Stewart's Cabinet of Mathematical Curiosities(P.65)"幻方"一般是指杷從 1 到 n2 的自然數排成縱橫各有 n 個數的方陣,使同行、同列與... 阅读全文
posted @ 2010-04-12 09:52 wlu 阅读(583) 评论(0) 推荐(0) 编辑
摘要: 单链表的设计一直被我认为很简单,最近细细看了一本书中对单链表的设计,发现其中有一些有意思的地方。1. 单链表中插入元素的操作,可以不用定位当前节点的前驱节点:1)temp_element = curr.element; tem_next = curr.next;//暂存当前节点的元素以及当前节点的后驱节点的指针2) curr.element = new_element;  //  将新元素赋值给当... 阅读全文
posted @ 2010-03-24 08:26 wlu 阅读(616) 评论(0) 推荐(0) 编辑
摘要: Hanoi tower运用递归算法。几年前没能了解其中的真正奥妙,想通了其实很简单,呵呵参见了《数据结构及算法分析 JAVA版》思路:1 设计disk和pole类,其中pole类类似于栈(先入后出)2 利用递归算法得出移动disk的先后顺序以及移动路线,并将每一步操作信息保存至链表中3 将链表中保存的结果打印出来以下是汉诺塔中定义的类:HanoiType.h代码 Code highlighting... 阅读全文
posted @ 2010-03-23 09:57 wlu 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 专心致志。非凡的人生源于专注。做事三心二意,会耗费一个人75%以上的精力。很多人不知道如何清除杂念,因为他们从未想过换种方式生活。看看周围那些令你羡慕的人的生活吧!看自己能从他们身上学到些什么?向他们请教,寻求专注的方式,把精力集中到真正重要的事情上。 阅读全文
posted @ 2010-03-21 21:19 wlu 阅读(197) 评论(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 阅读(227) 评论(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 阅读(390) 评论(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 阅读(278) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 下一页