Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20,#,#,15,7},
3
/ \
9 20
/ \
15 7
return its bottom-up level order traversal as:
[ [15,7], [9,20], [3] ]
confused what "{1,#,2,3}" means? > read more on how binary tree is serialized on OJ.
OJ's Binary Tree Serialization:
The serialization of a binary tree follows a level order traversal, where '#' signifies a path terminator where no node exists below.
Here's an example:
1
/ \
2 3
/
4
\
5
The above binary tree is serialized as
"{1,2,3,#,#,4,#,#,5}".
{优快云:CODE:630451}

本文介绍了一种特殊的二叉树遍历方式——从叶子节点到根节点的层级遍历,并通过一个具体例子展示了如何获取这种遍历结果。
402

被折叠的 条评论
为什么被折叠?



