11 2014 档案
摘要:1.指针与引用的区别:指针是一块内存的地址值,而引用是一块内存的别名。下面引自:http://www.cnblogs.com/kingln/articles/1129114.html从概念上讲。指针从本质上讲就是存放变量地址的一个变量,在逻辑上是独立的,它可以被改变,包括其所指向的地址的改变和其指向...
阅读全文
摘要:1 #include <fstream> 2 #include <iostream> 3 4 using namespace std; 5 6 struct node 7 { 8 char c; 9 struct node *lch,*rch; 10 }; 11 12 int count_leaf(
阅读全文
摘要:1 #include 2 #include 3 4 using namespace std; 5 6 /* 7 后序遍历的非递归实现是三种遍历方式中最难的一种。因为在后序遍历中,要保证左孩子和右孩子都已被访问并且左孩子在右孩子 8 前访问才能访问根结点,这就为流程的控制带来了难题。下面介绍两种思路。 9 第一种思路:对于任一结点P,将其...
阅读全文
摘要:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2132The Most Frequent NumberTime Limit:5 Seconds Memory Limit:1024 KBSeven (actually six)...
阅读全文