Flatten Binary Tree to Linked List
2015-09-08 17:27
190 查看
Given a binary tree, flatten it to a linked list in-place.
For example, Given
1
/ \
2 5
/ \ \
3 4 6
The flattened tree should look like:
1
\
2
\
3
\
4
\
5
\
6
题意:
这是树的题目,要求把一颗二叉树按照先序遍历顺序展成一个链表。
http://www.cfanz.cn/index.php?c=article&a=read&id=142361
For example, Given
1
/ \
2 5
/ \ \
3 4 6
The flattened tree should look like:
1
\
2
\
3
\
4
\
5
\
6
题意:
这是树的题目,要求把一颗二叉树按照先序遍历顺序展成一个链表。
http://www.cfanz.cn/index.php?c=article&a=read&id=142361
相关文章推荐
- PYTHON调用JENKINS的API来进行CI
- hdu1754:I Hate It
- ThinkPHP函数详解:C方法
- Linux系统裁剪(3)之动态增加Linux模块
- 从大神代码中学习CAAnimation
- Git 使用说明
- Hibernate – Many-to-Many example (Annotation)
- 使用layer-list实现单个方向或指定方向描边
- PHP执行exec调用svn up时候失败问题
- 字体超出 显示...
- Winform 让跨线程访问变得更简单
- HDU 1164 Eddy's research I
- Sublime Text 3 快捷键总结
- C语言中常用的库函数
- 关闭“JDK自动更新”提示
- MySQL SQL优化之in与range查询【转】
- 程序员必须知道的git托管平台
- http soap关系
- $(this).attr("checked",false);
- Algorithms—95.Unique Binary Search Trees II