![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
渣渣琪
菜鸟成长记
展开
-
Leet Code OJ 98. Validate Binary Search Tree [Difficulty: Medium] -python
题目:98.Validate Binary Search TreeMediumGiven a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only nodes with keysless thanthe node's key. The right subt...原创 2020-08-29 20:59:16 · 162 阅读 · 0 评论 -
AVL 平衡二叉树旋转方法
1、预备知识定义树(tree)的一种自然的方式是递归的方式。一棵树使一些节点的集合。这个集合可以是空集;若不是空集,则树由称作根(root)的节点 r 以及 0 个或多个非空的(子)树 T1,T2,T3,…,Tk 组成。这些子树每一颗的根都被来自根 r 的一条有向的边所连结。每一颗子树的根叫做根 r 的儿子(child),而根 r 是每一颗子树的根的父亲(parent)。没有儿子的根叫做树...转载 2018-08-14 18:42:35 · 181 阅读 · 0 评论