Skip to content

Commit 4a65627

Browse files
committed
Deployed 6325916 with MkDocs version: 0.17.3
1 parent 5bd1e54 commit 4a65627

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

17_二叉查找树/bst.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def _bst_remove(self, subtree, key):
104104
return subtree.left # 返回它的孩子并让它的父亲指过去
105105
else:
106106
return subtree.right
107-
else: # 俩孩子,寻找后继节点替换
107+
else: # 俩孩子,寻找后继节点替换,并删除其右子树的后继节点,同时更新其右子树
108108
successor_node = self._bst_min_node(subtree.right)
109109
subtree.key, subtree.value = successor_node.key, successor_node.value
110110
subtree.right = self._bst_remove(subtree.right, successor_node.key)

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ <h2 id="_8">受众</h2>
336336
的基本语法和面向对象编程的一些概念,我们这里只使用最基本的 Python 语法,不会再去介绍用到的 Python 语法糖。</p>
337337
<h1 id="_9">预备知识</h1>
338338
<ul>
339-
<li>有一定的 python 基础,掌握 Python 基本语法,了解 python 内置数据结构的使用方式。有过使用 Python 的经验。知道 class、module、yield 等</li>
339+
<li>有一定的 python 基础,掌握 Python 基本语法,了解 python 内置数据结构的使用方式。有过使用 Python 的经验。知道 class、module、yield 等。如果是 python 初学者,建议先补补基础,否则有些部分看着会比较吃力。</li>
340340
<li>基本的面向对象编程知识,会定义和使用 Python 中的类 (class)</li>
341341
<li>知道 Python 中的魔术方法,比如 <code>__len__</code> <code>__contains__</code></li>
342342
<li>无需太多数学基础,仅在算法时间复杂度分析的时候会用到一些简单数学知识。对于学习基础算法,逻辑思维可能更重要一些</li>
@@ -489,5 +489,5 @@ <h2 id="_19">本电子书制作和写作方式</h2>
489489

490490
<!--
491491
MkDocs version : 0.17.3
492-
Build Date UTC : 2018-06-10 09:42:48
492+
Build Date UTC : 2018-06-10 12:00:51
493493
-->

0 commit comments

Comments
 (0)