会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
jiu__
卓越 OR 淘汰
博客园
首页
新随笔
联系
管理
上一页
1
···
57
58
59
60
61
2014年11月27日
由先序遍历序列和中序遍历序列恢复二叉树以及统计叶子节点个数和树的深度
摘要: 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~
阅读(1070)
评论(0)
推荐(1)
2014年11月25日
二叉树的几种递归和非递归式遍历
摘要: 1 #include 2 #include 3 4 using namespace std; 5 6 /* 7 后序遍历的非递归实现是三种遍历方式中最难的一种。因为在后序遍历中,要保证左孩子和右孩子都已被访问并且左孩子在右孩子 8 前访问才能访问根结点,这就为流程的控制带来了难题。下面介绍两种思路。 9 第一种思路:对于任一结点P,将其...
阅读全文
posted @ 2014-11-25 00:35 jiu~
阅读(777)
评论(0)
推荐(0)
2014年11月24日
zoj2132-The Most Frequent Number
摘要: 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~
阅读(261)
评论(0)
推荐(0)
上一页
1
···
57
58
59
60
61
公告