当前位置:网站首页>Binary sort tree
Binary sort tree
2022-06-21 23:55:00 【Nancy-sn】
** Definition :** Left subtree node value < Root value < Right subtree node value , By default, the same keywords of two nodes are not allowed
** Search operation :** Start at the root node , If the target value is smaller, look to the left , If the target value is larger, look to the right
** The insert :** Find where to insert ( It must be a leaf node ), Be sure to change its parent node pointer
** Delete operation :**① The deleted node is a leaf , Delete directly ;② The deleted node has only left or right subtrees , Replace its position with its subtree ③ The deleted node has left 、 Right subtree : It can be replaced by its successor nodes , Then delete the successor node or replace it with its predecessor node , Delete the precursor node precursor ;
Forerunner : The lowest right node in the left subtree
The subsequent : The lowest left node in the right subtree
Search efficiency analysis :
Depends on the height of the tree , best O ( log n ), The worst O ( n )
边栏推荐
- IPD chip shipments exceeded 1billion, and chips and semiconductors appeared in ims2022
- 211 college Master of divinity thesis swipe the screen! 75 lines wrong 20 lines! School response: the tutor stopped recruiting
- 你有一个机会,这里有一个舞台
- 所谓的0拷贝不就是为了让CPU休息吗?深入理解mmap
- H5 wechat authorized login (wechat authorized login of the uniapp web version)
- 路由器连接上但上不了网是什么故障
- IPD芯片出货量超10亿颗,芯和半导体亮相IMS2022
- Unity-网络开发(二)
- 标志位生成
- June 21, 2022: golang multiple choice question, what does the following golang code output? A:3; B:4; C:100; D: Compilation failed. package main import (
猜你喜欢

I was badly hurt by the eight part essay....

QT practical skill: close unnecessary warning prompt on the right in the qtcreator editing area

Win11 hotspot connection successful but no network? Solution of win11 mobile hotspot and network conflict

泰山OFFICE技术讲座:微软雅黑字体故意设置的坑,粗体错误

Win11怎么把桌面文件路径改到D盘

Notes de développement de la tarte aux framboises (XVI): la tarte aux framboises 4b + installe la base de données mariadb (MySQL open source Branch) et teste les opérations de base

C# 委托(Delegate)

Native applet application applet - publishing process
![[数据库课程设计]基于Sql Server的教室信息管理系统(附部分源码)](/img/7e/47011ee2a35c50669a86fd5cf543d9.png)
[数据库课程设计]基于Sql Server的教室信息管理系统(附部分源码)

Solution to garbled Chinese display of securefx transmission remote server
随机推荐
Project change management
CVPR2022 | 弱监督多标签分类中的损失问题
今日睡眠质量记录81分
Cola and herbal tea speed up mutual rolling
Unity-网络开发(一)
硬件开发笔记(五):硬件开发基本流程,制作一个USB转RS232的模块(四):创建CON连接器件封装并关联原理图元器件
QT practical skill: close unnecessary warning prompt on the right in the qtcreator editing area
C delegate
树莓派开发笔记(十七):树莓派4B+上Qt多用户连接操作Mysql数据库同步(单条数据悲观锁)
It is said that the design of high concurrency system is not difficult at all!
Today's sleep quality record 81 points
Xiuno修罗轻论坛仿知乎蓝简约响应式主题模板1.7+自适应PC+WAP端
Xiuno Shura light forum imitation Zhihu blue simple responsive theme template 1.7+ adaptive pc+wap terminal
Inventaire des exploits courants
Hardware development notes (IV): basic process of hardware development, making a USB to RS232 module (III): design schematic diagram
Go语言学习教程(十二)
编程干货│PHP 常见方法封装
Analysis of Eureka
class path resource [classpath*:mapper/*.xml] cannot be opened because it does not exist
C语言【隐式类型转换】和【显式类型转换】的详解