
二叉树
julia7_
keep coding
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
A1020 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 output the level order traversal sequence of the cor...原创 2019-02-23 13:00:11 · 338 阅读 · 0 评论 -
A1102 Invert a Binary Tree (25 分)(反转二叉树求中序+层次)(二叉树的静态存储模板)
The following is from Max Howell @twitter:Google: 90% of our engineers use the software you wrote (Homebrew), but you can't invert a binary tree on a whiteboard so fuck off.Now it's your turn to...原创 2019-02-23 18:19:56 · 325 阅读 · 0 评论 -
A1043 Is It a Binary Search Tree (25 分)(二叉查找树)
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node's key. The right su...原创 2019-02-25 10:42:57 · 194 阅读 · 0 评论 -
A1064 Complete Binary Search Tree (30 分)(构建完全二叉排序树)
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node's key. The right su...原创 2019-02-25 11:03:36 · 696 阅读 · 0 评论 -
A1099 Build A Binary Search Tree (30 分)(已知树的形状构建二叉排序树)
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node's key. The right su...原创 2019-02-25 11:44:51 · 236 阅读 · 0 评论 -
A1066 Root of AVL Tree (25 分)(构建平衡二叉树)
An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is...原创 2019-02-25 12:14:36 · 958 阅读 · 0 评论