码迷,mamicode.com
首页 >  
搜索关键字:traversal    ( 1649个结果
Construct Binary Tree from Preorder and Inorder Traversal
来源:https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal Java Python ...
分类:其他好文   时间:2017-09-17 17:44:27    阅读次数:158
二叉树的遍历
先序遍历(Preorder Traversal) 根-左-右 1. 递归 Java 1 /** 2 * Definition for a binary tree node. 3 * public class TreeNode { 4 * int val; 5 * TreeNode left; 6 * ...
分类:其他好文   时间:2017-09-17 13:26:03    阅读次数:163
Lintcode70 Binary Tree Level Order Traversal II solution 题解
【题目描述】Givenabinarytree,returnthebottom-uplevelordertraversalofitsnodes‘values.(ie,fromlefttoright,levelbylevelfromleaftoroot).给出一棵二叉树,返回其节点值从底向上的层次序遍历(按从叶节点所在层到根节点所在的层遍历,然后逐层从左往右遍历)【题目链接】www..
分类:其他好文   时间:2017-09-12 16:17:36    阅读次数:121
[LeetCode] Binary Tree Preorder Traversal
Given a binary tree, return the preorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [1,2,3]. 递归 迭代 ...
分类:其他好文   时间:2017-09-10 12:34:47    阅读次数:70
[LeetCode] Binary Tree Inorder Traversal
Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree [1,null,2,3], return [1,3,2]. 递归 迭代 ...
分类:其他好文   时间:2017-09-10 12:29:40    阅读次数:135
[LintCode] Binary Tree Leaves Order Traversal
Given a binary tree, collect a tree's nodes as if you were doing this: Collect and remove all leaves, repeat until the tree is empty. Have you met thi ...
分类:其他好文   时间:2017-09-07 10:11:27    阅读次数:219
[LintCode] Binary Tree Vertical Order Traversal
Given a binary tree, return the vertical order traversal of its nodes' values. (ie, from top to bottom, column by column). If two nodes are in the sam ...
分类:其他好文   时间:2017-09-07 10:05:21    阅读次数:167
【Python算法】遍历(Traversal)、深度优先(DFS)、广度优先(BFS)
遍历、深度优先搜索(DFS)、广度优先搜索(BFS)、图的连通分量 ...
分类:编程语言   时间:2017-09-02 17:01:39    阅读次数:270
leetcode--Learn one iterative inorder traversal, apply it to multiple tree questions (Java Solution)
will show you all how to tackle various tree questions using iterative inorder traversal. First one is the standard iterative inorder traversal using ...
分类:移动开发   时间:2017-09-01 00:55:57    阅读次数:194
LeetCode 106. Construct Binary Tree from Inorder and Postorder Traversal (用中序和后序树遍历来建立二叉树)
Given inorder and postorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. 题目标签:Array, ...
分类:其他好文   时间:2017-08-27 11:12:14    阅读次数:133
1649条   上一页 1 ... 41 42 43 44 45 ... 165 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!