2020-07-14(二叉树的类型)

2020-07-14  本文已影响0人  swagsmile
  1. 二叉搜索树( binary search tree)的定义:
    Assume a BST is defined as follows:
  • The left subtree of a node contains only nodes with keys less than the node's key.
  • The right subtree of a node contains only nodes with keys greater than the node's key.
  • Both the left and right subtrees must also be binary search trees.

来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/validate-binary-search-tree
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。

  1. 高度平衡的二叉树

a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1

来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/convert-sorted-array-to-binary-search-tree
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。

3. 二叉树的类型

1. 满二叉树 Full Binary Tree

full binary tree

2. 完全二叉树 Complete Binary Tree

complete binary tree

2.AVL Tree

avl tree image.png
上一篇 下一篇

猜你喜欢

热点阅读