码迷,mamicode.com
首页 >  
搜索关键字:traversal    ( 1649个结果
[Algorithm] 94. Binary Tree Inorder Traversal iteratively approach
Given a binary tree, return the inorder traversal of its nodes' values. Example: Follow up: Recursive solution is trivial, could you do it iteratively ...
分类:移动开发   时间:2019-12-05 22:48:52    阅读次数:215
429. N-ary Tree Level Order Traversal
Given an n-ary tree, return the level order traversal of its nodes' values. Nary-Tree input serialization is represented in their level order traversa ...
分类:其他好文   时间:2019-12-01 00:14:00    阅读次数:112
590. N-ary Tree Postorder Traversal
Given an n-ary tree, return the postorder traversal of its nodes' values. Nary-Tree input serialization is represented in their level order traversal, ...
分类:其他好文   时间:2019-12-01 00:01:19    阅读次数:122
LeetCode 589. N-ary Tree Preorder Traversal
原题链接在这里:https://leetcode.com/problems/n-ary-tree-preorder-traversal/ 题目: Given an n-ary tree, return the preorder traversal of its nodes' values. Nary ...
分类:其他好文   时间:2019-11-27 10:42:13    阅读次数:71
1020 Tree Traversals (25 分)
Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to ou ...
分类:其他好文   时间:2019-11-25 18:02:45    阅读次数:74
二叉树的中序遍历
题目:给定一个二叉树,返回它的中序 遍历。 来源:https://leetcode-cn.com/problems/binary-tree-inorder-traversal/ 法一:网上的代码 思路:利用栈的递归,对每次取的节点进行标记,第一次遍历该节点时,标记为灰色,左子树和右子树标记为白色,注 ...
分类:其他好文   时间:2019-11-24 13:33:01    阅读次数:73
Java校招面试 G歌面试官亲授
Java校招面试 G歌面试官亲授 列表数组 链表 队列,栈 树二叉树 搜索树 堆/优先队列 栈/队列/优先队列push(1);push(3);push(2);pop();pop();pop();栈:2;3;1队列:1;3;2优先队列:1;2;3Map<K,V>/Set<K>HashMap/HashS ...
分类:编程语言   时间:2019-11-09 15:49:50    阅读次数:95
331. Verify Preorder Serialization of a Binary Tree
One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a null node, ...
分类:其他好文   时间:2019-11-09 09:18:11    阅读次数:93
【LeetCode】145. Binary Tree Postorder Traversal
Difficulty: Hard More:【目录】LeetCode Java实现 Description https://leetcode.com/problems/binary-tree-postorder-traversal/ Given a binary tree, return the p ...
分类:其他好文   时间:2019-11-04 13:56:04    阅读次数:101
【LeetCode】102. Binary Tree Level Order Traversal
Difficulty: Medium More:【目录】LeetCode Java实现 Description https://leetcode.com/problems/binary-tree-level-order-traversal/ Given a binary tree, return t ...
分类:其他好文   时间:2019-11-04 13:20:15    阅读次数:103
1649条   上一页 1 ... 10 11 12 13 14 ... 165 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!