前序遍历
文章平均质量分 81
jmspan
这个作者很懒,什么都没留下…
展开
-
LeetCode 105. Construct Binary Tree from Preorder and Inorder Traversal(从前序遍历和中序遍历构造二叉树)
原题网址:https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/ Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume t原创 2016-05-24 00:12:34 · 437 阅读 · 0 评论 -
LeetCode 255. Verify Preorder Sequence in Binary Search Tree(检查二叉搜索树的前序遍历)
原题网址:https://leetcode.com/problems/verify-preorder-sequence-in-binary-search-tree/ Given an array of numbers, verify whether it is the correct preorder traversal sequence of a binary search tree.原创 2016-04-09 04:44:06 · 963 阅读 · 0 评论 -
LeetCode 144. Binary Tree Preorder Traversal(二叉树前缀遍历)
原题网址:https://leetcode.com/problems/binary-tree-preorder-traversal/ Given a binary tree, return the preorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1原创 2016-05-26 01:57:11 · 543 阅读 · 0 评论 -
LeetCode 331. Verify Preorder Serialization of a Binary Tree(校验二叉树的前序遍历序列化)
原题网址:https://leetcode.com/problems/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 t原创 2016-04-28 07:36:08 · 923 阅读 · 0 评论