二叉树 删除所有叶子节点
2014-02-25 13:09
190 查看
static Node removeLeaves( Node t ) { if (t == null || ( t.left == null && t.right == null )) return null; t.left = removeLeaves( t.left ); t.right = removeLeaves( t.right ); return t; }
相关文章推荐
- POJ 3984 我的BFS第一题
- cocos2dx 3.0 ---base
- CodeIgniter + smarty 实现widget功能
- Cracking the coding interview--Q8.3
- 多个版本Unity4.x并存的解决方案
- 网络编程中几个地址结构与转换(in_addr,sockaddr,sockaddr_in,pcap_addr)
- 运算符
- 傻眼了!一组超震撼的国外摄影图片欣赏
- 北影校花常乐飚戏 角色转换间实力展现
- 搭建企业级NTP时间服务器
- 初尝map
- Invalidate和postInvalidate的区别
- (6)ExtJS之工具栏toolbar 2
- OpenGL: 正交投影问题
- MVC中的几个问题汇总
- OvershareKit:开源的iOS社交分享工具库
- Eclipse插件开发
- 程序设计语言
- Python集合(set)类型的操作
- jquery 事件监听