树的遍历
Oliver_H_
这个作者很懒,什么都没留下…
展开
-
1020 Tree Traversals(in+post->level order)
Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the cor...原创 2019-08-26 09:35:13 · 249 阅读 · 0 评论 -
1086 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 keys numbered from 1 to 6) is traversed, the stac...原创 2019-09-02 13:50:19 · 109 阅读 · 0 评论 -
1090 Highest Price in Supply Chain(DFS)
A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer. Starting from one root supplier, everyone on the...原创 2019-09-03 11:38:59 · 109 阅读 · 0 评论