码迷,mamicode.com
首页 >  
搜索关键字:traversal    ( 1649个结果
144. Binary Tree Preorder Traversal
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
105. Construct Binary Tree from Preorder and Inorder Traversal
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
107. Binary Tree Level Order Traversal II
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
102. Binary Tree Level Order Traversal
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
19.3.5 [LeetCode 103] Binary Tree Zigzag Level Order Traversal
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
Binary Tree Zigzag Level Order Traversal
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
Construct Binary Tree from Preorder and Inorder Traversal
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
PAT A1020——已知后序中序遍历求层序遍历
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
【leetcode】987. Vertical Order Traversal of a Binary Tree
题目如下: 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
P2679 子串
#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
1649条   上一页 1 ... 19 20 21 22 23 ... 165 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!