This commit is contained in:
krahets
2023-08-19 19:21:30 +08:00
parent 5884de5246
commit c2642f951c
25 changed files with 163 additions and 110 deletions

View File

@@ -4907,6 +4907,8 @@ void insert(int num) {
<h2 id="742">7.4.2. &nbsp; 二叉搜索树的效率<a class="headerlink" href="#742" title="Permanent link">&para;</a></h2>
<p>给定一组数据,我们考虑使用数组或二叉搜索树存储。</p>
<p>观察可知,二叉搜索树的各项操作的时间复杂度都是对数阶,具有稳定且高效的性能表现。只有在高频添加、低频查找删除的数据适用场景下,数组比二叉搜索树的效率更高。</p>
<p align="center"> 表:数组与搜索树的效率对比 </p>
<div class="center-table">
<table>
<thead>