最新 最热

Discuz the user traversal Poc

我们随便点进一个discuz论坛,在地址后面加?1,有的论坛就会显示uid=1的用户资料页(或是家园空间首页,取决于这个论坛有没有开通家园):

2023-10-21
3

根据前序和中序(后序和中序)遍历构造树 #算法#

Given preorder and inorder traversal of a tree, construct the binary tree. 根据前序和中序遍历序列构建二叉树。 Note: You may assume that duplicates do not exist in the tree.

2022-06-23
3

Leetcode 题目解析之 Construct Binary Tree from Inorder and Postorder Traversal

Given inorder and postorder traversal of a tree, construct the binary tree.

2022-01-08
3

关于前中后序排列

重点看“根”的位置,在最前面就是前序,中间就是中序,后面就是后序。补充一点,上述排列都是DFT(深度优先排列,Depth First Traversals)。另有Breadth First or Level Order Traversal 。...

2021-10-15
3

LeetCode 0144 - Binary Tree Preorder Traversal

Given a binary tree, return the preorder traversal of its nodes’ values.

2021-08-11
4

LeetCode 0145 - Binary Tree Postorder Traversal

Given a binary tree, return the postorder traversal of its nodes’ values.

2021-08-11
3

LeetCode 0102 - 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).

2021-08-11
3

LeetCode 0103 - Binary Tree Zigzag Level Order Traversal

Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to left for the next level and alternate ...

2021-08-11
3

LeetCode 0105 - Construct Binary Tree from Preorder and Inorder Traversal

Given preorder and inorder traversal of a tree, construct the binary tree.

2021-08-11
3

LeetCode 0106 - Construct Binary Tree from Inorder and Postorder Traversal

Given inorder and postorder traversal of a tree, construct the binary tree.

2021-08-11
3