二叉树的复杂性 [英] Binary tree complexities
本文介绍了二叉树的复杂性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道二叉搜索树的一些复杂性.
I would like to know some complexities of binary search tree.
我找不到完整的信息.我想知道二叉搜索树上以下操作的复杂性
I can't find complete information. I want to know complexities for the following operations on a binary search tree
- 添加/插入元素
- 删除元素
- 找到一个元素(据我所知,这是
O(log(n))
)
推荐答案
在二叉搜索树中插入,删除和搜索是:
Insertion, deletion and searching in a binary search tree are:
-
O(N)
在最坏的情况下; 通常情况下 -
O(log(N))
.
O(N)
in the worst case;O(log(N))
in the average case.
这篇关于二叉树的复杂性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文