Leetcode 314 Binary Tree Vertical Order Traversa
2016-01-30 07:13
387 查看
This question is nothing fancy, just need to get the position that the root should be. and the length for the whole array
The idea is from here.
http://www.shuatiblog.com/blog/2014/12/17/Print-Binary-Tree-Vertically/
and use these two sentence to get the root position and the length of the array.
The idea is from here.
http://www.shuatiblog.com/blog/2014/12/17/Print-Binary-Tree-Vertically/
and use these two sentence to get the root position and the length of the array.
int rootIndex = 0 - range[0]; int columns = range[1] - range[0] + 1;
相关文章推荐
- Leetcode 274. H-Index
- Leetcode 299 Bulls and Cows
- 夺命雷公狗---微信开发18----删除自定义菜单
- tkinter的GUI设计:界面与逻辑分离(二)-- 菜单栏
- 夺命雷公狗---微信开发17----自定义菜单的事件推送,响应菜单的CLICK
- 数据挖掘博客收集
- localStorage
- linux shell编程零基础入门
- Broken Code
- canvas
- 夺命雷公狗---微信开发16----自定义菜单的查询
- 10大经典数据挖掘方法
- ORACLE SQL性能优化系列 (四)
- ORACLE SQL性能优化系列 (三)
- ORACLE SQL性能优化系列 (二)
- Trapping Rain Water (Bar Height) -- LeetCode
- 欢迎使用CSDN-markdown编辑器
- svg
- 夺命雷公狗---微信开发15----编写进行创建自定义菜单
- Wunder Fund Round 2016 C. Constellation(贪心+计算几何)