This commit is contained in:
krahets 2023-09-12 00:56:10 +08:00
parent 479bdf2973
commit 07daa84bff
5 changed files with 176 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View file

@ -723,6 +723,13 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#223" class="md-nav__link">
2.2.3 &nbsp; 两者对比
</a>
</li>
</ul>
@ -3532,6 +3539,13 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#223" class="md-nav__link">
2.2.3 &nbsp; 两者对比
</a>
</li>
</ul>
@ -4564,7 +4578,7 @@
</div>
</div>
</div>
<p>两种递归的过程对比如图 2-5 所示</p>
<p>尾递归的执行过程如图 2-5 所示。对比普通递归和尾递归,求和操作的执行点是不同的</p>
<ul>
<li><strong>普通递归</strong>:求和操作是在“归”的过程中执行的,每层返回后都要再执行一次求和操作。</li>
<li><strong>尾递归</strong>:求和操作是在“递”的过程中执行的,“归”的过程只需层层返回。</li>
@ -4572,7 +4586,10 @@
<p><img alt="尾递归过程" src="../iteration_and_recursion.assets/tail_recursion_sum.png" /></p>
<p align="center"> 图 2-5 &nbsp; 尾递归过程 </p>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>请注意许多编译器或解释器并不支持尾递归优化。例如Python 默认不支持尾递归优化,因此即使函数是尾递归形式,但仍然可能会遇到栈溢出问题。</p>
</div>
<h3 id="3_1">3. &nbsp; 递归树<a class="headerlink" href="#3_1" title="Permanent link">&para;</a></h3>
<p>当处理与“分治”相关的算法问题时,递归往往比迭代的思路更加直观、代码更加易读。以“斐波那契数列”为例。</p>
<div class="admonition question">
@ -4744,6 +4761,161 @@
<li>从算法角度看,搜索、排序、回溯、分治、动态规划等许多重要算法策略都直接或间接地应用这种思维方式。</li>
<li>从数据结构角度看,递归天然适合处理链表、树和图的相关问题,因为它们非常适合用分治思想进行分析。</li>
</ul>
<h2 id="223">2.2.3 &nbsp; 两者对比<a class="headerlink" href="#223" title="Permanent link">&para;</a></h2>
<p>总结以上内容,如表 2-1 所示,迭代和递归在实现、性能和适用性上有所不同。</p>
<p align="center"> 表 2-1 &nbsp; 迭代与递归特点对比 </p>
<div class="center-table">
<table>
<thead>
<tr>
<th></th>
<th>迭代</th>
<th>递归</th>
</tr>
</thead>
<tbody>
<tr>
<td>实现方式</td>
<td>循环结构</td>
<td>函数调用自身</td>
</tr>
<tr>
<td>时间效率</td>
<td>效率通常较高,无函数调用开销</td>
<td>每次函数调用都会产生开销</td>
</tr>
<tr>
<td>内存使用</td>
<td>通常使用固定大小的内存空间</td>
<td>累积函数调用可能使用大量的栈帧空间</td>
</tr>
<tr>
<td>适用问题</td>
<td>适用于简单循环任务,代码直观、可读性好</td>
<td>适用于子问题分解,如树、图、分治、回溯等,代码结构简洁、清晰</td>
</tr>
</tbody>
</table>
</div>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>如果感觉以下内容理解困难,可以在读完“栈”章节后再来复习。</p>
</div>
<p>那么,迭代和递归具有什么内在联系呢?以上述的递归函数为例,求和操作在递归的“归”阶段进行。这意味着最初被调用的函数实际上是最后完成其求和操作的,<strong>这种工作机制与栈的“先入后出”原则是异曲同工的</strong></p>
<p>事实上,“调用栈”和“栈帧空间”这类递归术语已经暗示了递归与栈之间的密切关系。</p>
<ol>
<li><strong></strong>:当函数被调用时,系统会在“调用栈”上为该函数分配新的栈帧,用于存储函数的局部变量、参数、返回地址等数据。</li>
<li><strong></strong>:当函数完成执行并返回时,对应的栈帧会从“调用栈”上被移除,恢复之前函数的执行环境。</li>
</ol>
<p>因此,<strong>我们可以使用一个显式的栈来模拟调用栈的行为</strong>,从而将递归转化为迭代形式:</p>
<div class="tabbed-set tabbed-alternate" data-tabs="8:12"><input checked="checked" id="__tabbed_8_1" name="__tabbed_8" type="radio" /><input id="__tabbed_8_2" name="__tabbed_8" type="radio" /><input id="__tabbed_8_3" name="__tabbed_8" type="radio" /><input id="__tabbed_8_4" name="__tabbed_8" type="radio" /><input id="__tabbed_8_5" name="__tabbed_8" type="radio" /><input id="__tabbed_8_6" name="__tabbed_8" type="radio" /><input id="__tabbed_8_7" name="__tabbed_8" type="radio" /><input id="__tabbed_8_8" name="__tabbed_8" type="radio" /><input id="__tabbed_8_9" name="__tabbed_8" type="radio" /><input id="__tabbed_8_10" name="__tabbed_8" type="radio" /><input id="__tabbed_8_11" name="__tabbed_8" type="radio" /><input id="__tabbed_8_12" name="__tabbed_8" type="radio" /><div class="tabbed-labels"><label for="__tabbed_8_1">Python</label><label for="__tabbed_8_2">C++</label><label for="__tabbed_8_3">Java</label><label for="__tabbed_8_4">C#</label><label for="__tabbed_8_5">Go</label><label for="__tabbed_8_6">Swift</label><label for="__tabbed_8_7">JS</label><label for="__tabbed_8_8">TS</label><label for="__tabbed_8_9">Dart</label><label for="__tabbed_8_10">Rust</label><label for="__tabbed_8_11">C</label><label for="__tabbed_8_12">Zig</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
<div class="highlight"><span class="filename">recursion.py</span><pre><span></span><code><a id="__codelineno-84-1" name="__codelineno-84-1" href="#__codelineno-84-1"></a><span class="k">def</span> <span class="nf">for_loop_recur</span><span class="p">(</span><span class="n">n</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">int</span><span class="p">:</span>
<a id="__codelineno-84-2" name="__codelineno-84-2" href="#__codelineno-84-2"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;使用迭代模拟递归&quot;&quot;&quot;</span>
<a id="__codelineno-84-3" name="__codelineno-84-3" href="#__codelineno-84-3"></a> <span class="c1"># 使用一个显式的栈来模拟系统调用栈</span>
<a id="__codelineno-84-4" name="__codelineno-84-4" href="#__codelineno-84-4"></a> <span class="n">stack</span> <span class="o">=</span> <span class="p">[]</span>
<a id="__codelineno-84-5" name="__codelineno-84-5" href="#__codelineno-84-5"></a> <span class="n">res</span> <span class="o">=</span> <span class="mi">0</span>
<a id="__codelineno-84-6" name="__codelineno-84-6" href="#__codelineno-84-6"></a> <span class="c1"># 递:递归调用</span>
<a id="__codelineno-84-7" name="__codelineno-84-7" href="#__codelineno-84-7"></a> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">):</span>
<a id="__codelineno-84-8" name="__codelineno-84-8" href="#__codelineno-84-8"></a> <span class="c1"># 通过“入栈操作”模拟“递”</span>
<a id="__codelineno-84-9" name="__codelineno-84-9" href="#__codelineno-84-9"></a> <span class="n">stack</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
<a id="__codelineno-84-10" name="__codelineno-84-10" href="#__codelineno-84-10"></a> <span class="c1"># 归:返回结果</span>
<a id="__codelineno-84-11" name="__codelineno-84-11" href="#__codelineno-84-11"></a> <span class="k">while</span> <span class="n">stack</span><span class="p">:</span>
<a id="__codelineno-84-12" name="__codelineno-84-12" href="#__codelineno-84-12"></a> <span class="c1"># 通过“出栈操作”模拟“归”</span>
<a id="__codelineno-84-13" name="__codelineno-84-13" href="#__codelineno-84-13"></a> <span class="n">res</span> <span class="o">+=</span> <span class="n">stack</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span>
<a id="__codelineno-84-14" name="__codelineno-84-14" href="#__codelineno-84-14"></a> <span class="c1"># res = 1+2+3+...+n</span>
<a id="__codelineno-84-15" name="__codelineno-84-15" href="#__codelineno-84-15"></a> <span class="k">return</span> <span class="n">res</span>
</code></pre></div>
</div>
<div class="tabbed-block">
<div class="highlight"><span class="filename">recursion.cpp</span><pre><span></span><code><a id="__codelineno-85-1" name="__codelineno-85-1" href="#__codelineno-85-1"></a><span class="cm">/* 使用迭代模拟递归 */</span>
<a id="__codelineno-85-2" name="__codelineno-85-2" href="#__codelineno-85-2"></a><span class="kt">int</span><span class="w"> </span><span class="nf">forLoopRecur</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">n</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-85-3" name="__codelineno-85-3" href="#__codelineno-85-3"></a><span class="w"> </span><span class="c1">// 使用一个显式的栈来模拟系统调用栈</span>
<a id="__codelineno-85-4" name="__codelineno-85-4" href="#__codelineno-85-4"></a><span class="w"> </span><span class="n">stack</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="w"> </span><span class="n">stack</span><span class="p">;</span>
<a id="__codelineno-85-5" name="__codelineno-85-5" href="#__codelineno-85-5"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<a id="__codelineno-85-6" name="__codelineno-85-6" href="#__codelineno-85-6"></a><span class="w"> </span><span class="c1">// 递:递归调用</span>
<a id="__codelineno-85-7" name="__codelineno-85-7" href="#__codelineno-85-7"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">n</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">--</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-85-8" name="__codelineno-85-8" href="#__codelineno-85-8"></a><span class="w"> </span><span class="c1">// 通过“入栈操作”模拟“递”</span>
<a id="__codelineno-85-9" name="__codelineno-85-9" href="#__codelineno-85-9"></a><span class="w"> </span><span class="n">stack</span><span class="p">.</span><span class="n">push</span><span class="p">(</span><span class="n">i</span><span class="p">);</span>
<a id="__codelineno-85-10" name="__codelineno-85-10" href="#__codelineno-85-10"></a><span class="w"> </span><span class="p">}</span>
<a id="__codelineno-85-11" name="__codelineno-85-11" href="#__codelineno-85-11"></a><span class="w"> </span><span class="c1">// 归:返回结果</span>
<a id="__codelineno-85-12" name="__codelineno-85-12" href="#__codelineno-85-12"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">stack</span><span class="p">.</span><span class="n">empty</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-85-13" name="__codelineno-85-13" href="#__codelineno-85-13"></a><span class="w"> </span><span class="c1">// 通过“出栈操作”模拟“归”</span>
<a id="__codelineno-85-14" name="__codelineno-85-14" href="#__codelineno-85-14"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">stack</span><span class="p">.</span><span class="n">top</span><span class="p">();</span>
<a id="__codelineno-85-15" name="__codelineno-85-15" href="#__codelineno-85-15"></a><span class="w"> </span><span class="n">stack</span><span class="p">.</span><span class="n">pop</span><span class="p">();</span>
<a id="__codelineno-85-16" name="__codelineno-85-16" href="#__codelineno-85-16"></a><span class="w"> </span><span class="p">}</span>
<a id="__codelineno-85-17" name="__codelineno-85-17" href="#__codelineno-85-17"></a><span class="w"> </span><span class="c1">// res = 1+2+3+...+n</span>
<a id="__codelineno-85-18" name="__codelineno-85-18" href="#__codelineno-85-18"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">res</span><span class="p">;</span>
<a id="__codelineno-85-19" name="__codelineno-85-19" href="#__codelineno-85-19"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
<div class="highlight"><span class="filename">recursion.java</span><pre><span></span><code><a id="__codelineno-86-1" name="__codelineno-86-1" href="#__codelineno-86-1"></a><span class="cm">/* 使用迭代模拟递归 */</span>
<a id="__codelineno-86-2" name="__codelineno-86-2" href="#__codelineno-86-2"></a><span class="kt">int</span><span class="w"> </span><span class="nf">forLoopRecur</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">n</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-86-3" name="__codelineno-86-3" href="#__codelineno-86-3"></a><span class="w"> </span><span class="c1">// 使用一个显式的栈来模拟系统调用栈</span>
<a id="__codelineno-86-4" name="__codelineno-86-4" href="#__codelineno-86-4"></a><span class="w"> </span><span class="n">Stack</span><span class="o">&lt;</span><span class="n">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">stack</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Stack</span><span class="o">&lt;&gt;</span><span class="p">();</span>
<a id="__codelineno-86-5" name="__codelineno-86-5" href="#__codelineno-86-5"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<a id="__codelineno-86-6" name="__codelineno-86-6" href="#__codelineno-86-6"></a><span class="w"> </span><span class="c1">// 递:递归调用</span>
<a id="__codelineno-86-7" name="__codelineno-86-7" href="#__codelineno-86-7"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">n</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">--</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-86-8" name="__codelineno-86-8" href="#__codelineno-86-8"></a><span class="w"> </span><span class="c1">// 通过“入栈操作”模拟“递”</span>
<a id="__codelineno-86-9" name="__codelineno-86-9" href="#__codelineno-86-9"></a><span class="w"> </span><span class="n">stack</span><span class="p">.</span><span class="na">push</span><span class="p">(</span><span class="n">i</span><span class="p">);</span>
<a id="__codelineno-86-10" name="__codelineno-86-10" href="#__codelineno-86-10"></a><span class="w"> </span><span class="p">}</span>
<a id="__codelineno-86-11" name="__codelineno-86-11" href="#__codelineno-86-11"></a><span class="w"> </span><span class="c1">// 归:返回结果</span>
<a id="__codelineno-86-12" name="__codelineno-86-12" href="#__codelineno-86-12"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">stack</span><span class="p">.</span><span class="na">isEmpty</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-86-13" name="__codelineno-86-13" href="#__codelineno-86-13"></a><span class="w"> </span><span class="c1">// 通过“出栈操作”模拟“归”</span>
<a id="__codelineno-86-14" name="__codelineno-86-14" href="#__codelineno-86-14"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">stack</span><span class="p">.</span><span class="na">pop</span><span class="p">();</span>
<a id="__codelineno-86-15" name="__codelineno-86-15" href="#__codelineno-86-15"></a><span class="w"> </span><span class="p">}</span>
<a id="__codelineno-86-16" name="__codelineno-86-16" href="#__codelineno-86-16"></a><span class="w"> </span><span class="c1">// res = 1+2+3+...+n</span>
<a id="__codelineno-86-17" name="__codelineno-86-17" href="#__codelineno-86-17"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">res</span><span class="p">;</span>
<a id="__codelineno-86-18" name="__codelineno-86-18" href="#__codelineno-86-18"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
<div class="highlight"><span class="filename">recursion.cs</span><pre><span></span><code><a id="__codelineno-87-1" name="__codelineno-87-1" href="#__codelineno-87-1"></a><span class="na">[class]</span><span class="p">{</span><span class="n">recursion</span><span class="p">}</span><span class="o">-</span><span class="p">[</span><span class="n">func</span><span class="p">]{</span><span class="n">forLoopRecur</span><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
<div class="highlight"><span class="filename">recursion.go</span><pre><span></span><code><a id="__codelineno-88-1" name="__codelineno-88-1" href="#__codelineno-88-1"></a><span class="p">[</span><span class="nx">class</span><span class="p">]{}</span><span class="o">-</span><span class="p">[</span><span class="kd">func</span><span class="p">]{</span><span class="nx">forLoopRecur</span><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
<div class="highlight"><span class="filename">recursion.swift</span><pre><span></span><code><a id="__codelineno-89-1" name="__codelineno-89-1" href="#__codelineno-89-1"></a><span class="p">[</span><span class="kd">class</span><span class="p">]{}</span><span class="o">-</span><span class="p">[</span><span class="kd">func</span><span class="p">]{</span><span class="n">forLoopRecur</span><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
<div class="highlight"><span class="filename">recursion.js</span><pre><span></span><code><a id="__codelineno-90-1" name="__codelineno-90-1" href="#__codelineno-90-1"></a><span class="p">[</span><span class="kd">class</span><span class="p">]{}</span><span class="o">-</span><span class="p">[</span><span class="nx">func</span><span class="p">]{</span><span class="nx">forLoopRecur</span><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
<div class="highlight"><span class="filename">recursion.ts</span><pre><span></span><code><a id="__codelineno-91-1" name="__codelineno-91-1" href="#__codelineno-91-1"></a><span class="p">[</span><span class="kd">class</span><span class="p">]{}</span><span class="o">-</span><span class="p">[</span><span class="nx">func</span><span class="p">]{</span><span class="nx">forLoopRecur</span><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
<div class="highlight"><span class="filename">recursion.dart</span><pre><span></span><code><a id="__codelineno-92-1" name="__codelineno-92-1" href="#__codelineno-92-1"></a><span class="p">[</span><span class="n">class</span><span class="p">]{}</span><span class="o">-</span><span class="p">[</span><span class="n">func</span><span class="p">]{</span><span class="n">forLoopRecur</span><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
<div class="highlight"><span class="filename">recursion.rs</span><pre><span></span><code><a id="__codelineno-93-1" name="__codelineno-93-1" href="#__codelineno-93-1"></a><span class="p">[</span><span class="n">class</span><span class="p">]{}</span><span class="o">-</span><span class="p">[</span><span class="n">func</span><span class="p">]{</span><span class="n">for_loop_recur</span><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
<div class="highlight"><span class="filename">recursion.c</span><pre><span></span><code><a id="__codelineno-94-1" name="__codelineno-94-1" href="#__codelineno-94-1"></a><span class="p">[</span><span class="n">class</span><span class="p">]{}</span><span class="o">-</span><span class="p">[</span><span class="n">func</span><span class="p">]{</span><span class="n">forLoopRecur</span><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
<div class="highlight"><span class="filename">recursion.zig</span><pre><span></span><code><a id="__codelineno-95-1" name="__codelineno-95-1" href="#__codelineno-95-1"></a><span class="p">[</span><span class="n">class</span><span class="p">]{}</span><span class="o">-</span><span class="p">[</span><span class="n">func</span><span class="p">]{</span><span class="n">forLoopRecur</span><span class="p">}</span>
</code></pre></div>
</div>
</div>
</div>
<p>观察以上代码,当递归被转换为迭代后,代码变得更加复杂了。尽管迭代和递归在很多情况下可以互相转换,但也不一定值得这样做,有以下两点原因。</p>
<ul>
<li>转化后的代码可能更加难以理解,可读性更差。</li>
<li>对于某些复杂问题,模拟系统调用栈的行为可能非常困难。</li>
</ul>
<p>总之,<strong>选择迭代还是递归取决于特定问题的性质</strong>。在编程实践中,权衡两者的优劣并根据情境选择合适的方法是至关重要的。</p>

View file

@ -4397,8 +4397,8 @@ T(n) &amp; = n^2 + n &amp; \text{偷懒统计 (o.O)}
\]</div>
<h3 id="2">2. &nbsp; 第二步:判断渐近上界<a class="headerlink" href="#2" title="Permanent link">&para;</a></h3>
<p><strong>时间复杂度由多项式 <span class="arithmatex">\(T(n)\)</span> 中最高阶的项来决定</strong>。这是因为在 <span class="arithmatex">\(n\)</span> 趋于无穷大时,最高阶的项将发挥主导作用,其他项的影响都可以被忽略。</p>
<p>表 2-1 展示了一些例子,其中一些夸张的值是为了强调“系数无法撼动阶数”这一结论。当 <span class="arithmatex">\(n\)</span> 趋于无穷大时,这些常数变得无足轻重。</p>
<p align="center"> 表 2-1 &nbsp; 不同操作数量对应的时间复杂度 </p>
<p>表 2-2 展示了一些例子,其中一些夸张的值是为了强调“系数无法撼动阶数”这一结论。当 <span class="arithmatex">\(n\)</span> 趋于无穷大时,这些常数变得无足轻重。</p>
<p align="center"> 表 2-2 &nbsp; 不同操作数量对应的时间复杂度 </p>
<div class="center-table">
<table>

File diff suppressed because one or more lines are too long

Binary file not shown.