2011-01-07 19:43 by zhhailon, 15 visits, 网摘, 收藏, 编辑 摘要: 打印二叉树的路径(root to leaf)。
基于12个网页-相关网页
打印二叉树的路径
Print the path of the binary tree
以上为机器翻译结果,长、整句建议使用 人工翻译 。
二叉树是面试里常考的一类数据结构,其中有一类寻找路径问题很有意思。目前见过两种类型题目,都是先给出一个和,然后要求打印出节点值之和与此相等的路径问题。
Given a binary tree and a number, print all the root-to-leaf paths such that adding up all the values along the path equals the given number.
youdao
应用推荐
模块上移
模块下移
不移动