given a binary tree, return the preorder traversal of its nodes' values. Solution 1://非递归 Solution 1://非递归 public class Solution { public List<Integer ...
分类:
其他好文 时间:
2019-03-15 14:39:42
阅读次数:
125
Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For example, ...
分类:
其他好文 时间:
2019-03-10 09:53:03
阅读次数:
121
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 ...
分类:
其他好文 时间:
2019-03-08 09:27:45
阅读次数:
188
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tree [3 ...
分类:
其他好文 时间:
2019-03-08 09:19:17
阅读次数:
179
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and ...
分类:
其他好文 时间:
2019-03-05 11:02:29
阅读次数:
198
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and ...
分类:
其他好文 时间:
2019-03-04 10:01:07
阅读次数:
157
Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For example, ...
分类:
其他好文 时间:
2019-03-04 09:23:18
阅读次数:
163
1020 Tree Traversals Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, y ...
分类:
其他好文 时间:
2019-02-27 01:41:50
阅读次数:
212
题目如下: Given a binary tree, return the vertical order traversal of its nodes values. For each node at position (X, Y), its left and right children resp ...
分类:
其他好文 时间:
2019-02-26 10:34:18
阅读次数:
104
#include #define read read() #define up(i,l,r) for(register int i = (l);i = (r);i--) #define traversal_vedge(i) for(register int i = head[u]; i ;i = e... ...
分类:
其他好文 时间:
2019-02-21 20:19:34
阅读次数:
201