上一页 1 ··· 57 58 59 60 61
摘要: 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( 阅读全文
posted @ 2014-11-27 21:15 jiu~ 阅读(1058) 评论(0) 推荐(1) 编辑
摘要: 1 #include 2 #include 3 4 using namespace std; 5 6 /* 7 后序遍历的非递归实现是三种遍历方式中最难的一种。因为在后序遍历中,要保证左孩子和右孩子都已被访问并且左孩子在右孩子 8 前访问才能访问根结点,这就为流程的控制带来了难题。下面介绍两种思路。 9 第一种思路:对于任一结点P,将其... 阅读全文
posted @ 2014-11-25 00:35 jiu~ 阅读(763) 评论(0) 推荐(0) 编辑
摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2132The Most Frequent NumberTime Limit:5 Seconds Memory Limit:1024 KBSeven (actually six)... 阅读全文
posted @ 2014-11-24 22:46 jiu~ 阅读(253) 评论(0) 推荐(0) 编辑
上一页 1 ··· 57 58 59 60 61