码迷,mamicode.com
首页 >  
搜索关键字:traversal    ( 1649个结果
(N叉树 BFS) leetcode429. N-ary Tree Level Order Traversal
Given an n-ary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example, given a 3-ary tree: ...
分类:其他好文   时间:2019-04-26 19:31:06    阅读次数:139
(N叉树 递归) leetcode 590. N-ary Tree Postorder Traversal
Given an n-ary tree, return the postorder traversal of its nodes' values. For example, given a 3-ary tree: Return its postorder traversal as: [5,6,3,2 ...
分类:其他好文   时间:2019-04-26 19:30:13    阅读次数:106
(二叉树 递归) leetcode 889. Construct Binary Tree from Preorder and Postorder Traversal
Return any binary tree that matches the given preorder and postorder traversals. Values in the traversals pre and post are distinct positive integers. ...
分类:其他好文   时间:2019-04-26 10:59:00    阅读次数:182
【leetcode】1028. Recover a Tree From Preorder Traversal
题目如下: We run a preorder depth first search on the root of a binary tree. At each node in this traversal, we output D dashes (where D is the depth of t ...
分类:其他好文   时间:2019-04-24 23:36:24    阅读次数:187
Leetcode 429. N-ary Tree Level Order Traversal
bfs ...
分类:其他好文   时间:2019-04-21 00:15:44    阅读次数:115
Leetcode 590. N-ary Tree Postorder Traversal
DFS,递归或者栈实现. ...
分类:其他好文   时间:2019-04-20 18:17:26    阅读次数:121
leetcode [144]Binary Tree Preorder Traversal
Given a binary tree, return the preorder traversal of its nodes' values. Example: Input: [1,null,2,3] 1 \ 2 / 3 Output: [1,2,3] Follow up: Recursive s ...
分类:其他好文   时间:2019-04-19 21:28:56    阅读次数:141
(二叉树 BFS) 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-04-17 09:49:18    阅读次数:145
Tree Traversals Again
An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the ...
分类:其他好文   时间:2019-04-16 01:28:53    阅读次数:181
LeetCode 106. Construct Binary Tree from Inorder and Postorder Traversal 由中序和后序遍历建立二叉树 C++
Given inorder and postorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For example, ...
分类:编程语言   时间:2019-04-15 23:23:39    阅读次数:214
1649条   上一页 1 ... 17 18 19 20 21 ... 165 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!