Skip to content

Commit 1959a09

Browse files
committed
Deployed 2b1e1fa with MkDocs version: 0.17.3
1 parent 95930f2 commit 1959a09

File tree

7 files changed

+37
-35
lines changed

7 files changed

+37
-35
lines changed
Binary file not shown.
Binary file not shown.

03_链表/linked_list.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,13 @@ def remove(self, value): # O(n)
6868
"""
6969
prevnode = self.root #
7070
curnode = self.root.next
71-
while curnode.next is not None:
71+
for curnode in self.iter_node():
7272
if curnode.value == value:
7373
prevnode.next = curnode.next
7474
del curnode
7575
self.length -= 1
76-
return
76+
return 1 # 表明删除成功
77+
return -1 # 表明删除失败
7778

7879
def find(self, value): # O(n)
7980
""" 查找一个节点,返回序号,从 0 开始
@@ -117,7 +118,8 @@ def test_linked_list():
117118
assert ll.find(2) == 2
118119
assert ll.find(3) == -1
119120

120-
ll.remove(0)
121+
assert ll.remove(0) == 1
122+
assert ll.remove(3) == -1
121123
assert len(ll) == 2
122124
assert ll.find(0) == -1
123125

17_二叉查找树/binary_search_tree/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ <h1 id="_8">练习题:</h1>
444444
<h1 id="_9">延伸阅读</h1>
445445
<ul>
446446
<li>《Data Structures and Algorithms in Python》14 章,树的概念和算法还有很多,我们这里介绍最基本的</li>
447-
<li>了解 mysql 索引使用的 Btree 结构</li>
447+
<li>了解 mysql 索引使用的 B-Tree 结构</li>
448448
</ul>
449449

450450
</div>

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ <h2 id="_17">工具</h2>
405405
<h2 id="_18">勘误</h2>
406406
<p>输出其实也是一种再学习的过程,中途需要查看大量资料、编写讲义、视频录制、代码编写等,难免有疏漏之处。
407407
有出版社找过笔者想让我出书,一来自己对出书兴趣不大,另外感觉书籍相对视频不够直观,有错误也不能及时修改,打算直接把所有
408-
文字内容讲义放到 github 上,供大家免费查阅。</p>
409-
<p>如果你觉得文字内容或者视频内容有错误,欢迎在 github 上提 issue 讨论,我会修正相关内容,防止产生误导</p>
408+
文字内容讲义和代码等放到 github 上,供大家免费查阅。</p>
409+
<p>如果你觉得文字内容、代码内容或者视频内容有错误,欢迎在 github 上提 issue 讨论,或者直接提 Merge Request,我会修正相关内容,防止对读者产生误导</p>
410410
<h2 id="_19">本电子书制作和写作方式</h2>
411411
<p>使用 mkdocs 和 markdown 构建,使用 Python-Markdown-Math 完成数学公式。
412412
markdown 语法参考:http://xianbai.me/learn-md/article/about/readme.html</p>
@@ -479,5 +479,5 @@ <h2 id="_19">本电子书制作和写作方式</h2>
479479

480480
<!--
481481
MkDocs version : 0.17.3
482-
Build Date UTC : 2018-05-27 12:46:42
482+
Build Date UTC : 2018-05-29 00:20:12
483483
-->

search/search_index.json

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

sitemap.xml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,111 +4,111 @@
44

55
<url>
66
<loc>/</loc>
7-
<lastmod>2018-05-27</lastmod>
7+
<lastmod>2018-05-29</lastmod>
88
<changefreq>daily</changefreq>
99
</url>
1010

1111

1212

1313
<url>
1414
<loc>/00_课程简介之笨方法学算法/why_and_how_to_learn/</loc>
15-
<lastmod>2018-05-27</lastmod>
15+
<lastmod>2018-05-29</lastmod>
1616
<changefreq>daily</changefreq>
1717
</url>
1818

1919

2020

2121
<url>
2222
<loc>/01_抽象数据类型和面向对象编程/ADT_OOP/</loc>
23-
<lastmod>2018-05-27</lastmod>
23+
<lastmod>2018-05-29</lastmod>
2424
<changefreq>daily</changefreq>
2525
</url>
2626

2727

2828

2929
<url>
3030
<loc>/02_数组和列表/array_and_list/</loc>
31-
<lastmod>2018-05-27</lastmod>
31+
<lastmod>2018-05-29</lastmod>
3232
<changefreq>daily</changefreq>
3333
</url>
3434

3535

3636

3737
<url>
3838
<loc>/03_链表/linked_list/</loc>
39-
<lastmod>2018-05-27</lastmod>
39+
<lastmod>2018-05-29</lastmod>
4040
<changefreq>daily</changefreq>
4141
</url>
4242

4343

4444

4545
<url>
4646
<loc>/04_队列/queue/</loc>
47-
<lastmod>2018-05-27</lastmod>
47+
<lastmod>2018-05-29</lastmod>
4848
<changefreq>daily</changefreq>
4949
</url>
5050

5151

5252

5353
<url>
5454
<loc>/05_栈/stack/</loc>
55-
<lastmod>2018-05-27</lastmod>
55+
<lastmod>2018-05-29</lastmod>
5656
<changefreq>daily</changefreq>
5757
</url>
5858

5959

6060

6161
<url>
6262
<loc>/06_算法分析/big_o/</loc>
63-
<lastmod>2018-05-27</lastmod>
63+
<lastmod>2018-05-29</lastmod>
6464
<changefreq>daily</changefreq>
6565
</url>
6666

6767

6868

6969
<url>
7070
<loc>/07_哈希表/hashtable/</loc>
71-
<lastmod>2018-05-27</lastmod>
71+
<lastmod>2018-05-29</lastmod>
7272
<changefreq>daily</changefreq>
7373
</url>
7474

7575

7676

7777
<url>
7878
<loc>/08_字典/dict/</loc>
79-
<lastmod>2018-05-27</lastmod>
79+
<lastmod>2018-05-29</lastmod>
8080
<changefreq>daily</changefreq>
8181
</url>
8282

8383

8484

8585
<url>
8686
<loc>/09_集合/set/</loc>
87-
<lastmod>2018-05-27</lastmod>
87+
<lastmod>2018-05-29</lastmod>
8888
<changefreq>daily</changefreq>
8989
</url>
9090

9191

9292

9393
<url>
9494
<loc>/10_递归/recursion/</loc>
95-
<lastmod>2018-05-27</lastmod>
95+
<lastmod>2018-05-29</lastmod>
9696
<changefreq>daily</changefreq>
9797
</url>
9898

9999

100100

101101
<url>
102102
<loc>/11_线性查找与二分查找/search/</loc>
103-
<lastmod>2018-05-27</lastmod>
103+
<lastmod>2018-05-29</lastmod>
104104
<changefreq>daily</changefreq>
105105
</url>
106106

107107

108108

109109
<url>
110110
<loc>/12_基本排序算法/basic_sort/</loc>
111-
<lastmod>2018-05-27</lastmod>
111+
<lastmod>2018-05-29</lastmod>
112112
<changefreq>daily</changefreq>
113113
</url>
114114

@@ -117,19 +117,19 @@
117117

118118
<url>
119119
<loc>/13_高级排序算法/advanced_sorting/</loc>
120-
<lastmod>2018-05-27</lastmod>
120+
<lastmod>2018-05-29</lastmod>
121121
<changefreq>daily</changefreq>
122122
</url>
123123

124124
<url>
125125
<loc>/13_高级排序算法/merge_sort/</loc>
126-
<lastmod>2018-05-27</lastmod>
126+
<lastmod>2018-05-29</lastmod>
127127
<changefreq>daily</changefreq>
128128
</url>
129129

130130
<url>
131131
<loc>/13_高级排序算法/quick_sort/</loc>
132-
<lastmod>2018-05-27</lastmod>
132+
<lastmod>2018-05-29</lastmod>
133133
<changefreq>daily</changefreq>
134134
</url>
135135

@@ -138,55 +138,55 @@
138138

139139
<url>
140140
<loc>/14_树与二叉树/tree/</loc>
141-
<lastmod>2018-05-27</lastmod>
141+
<lastmod>2018-05-29</lastmod>
142142
<changefreq>daily</changefreq>
143143
</url>
144144

145145

146146

147147
<url>
148148
<loc>/15_堆与堆排序/heap_and_heapsort/</loc>
149-
<lastmod>2018-05-27</lastmod>
149+
<lastmod>2018-05-29</lastmod>
150150
<changefreq>daily</changefreq>
151151
</url>
152152

153153

154154

155155
<url>
156156
<loc>/16_优先级队列/priority_queue/</loc>
157-
<lastmod>2018-05-27</lastmod>
157+
<lastmod>2018-05-29</lastmod>
158158
<changefreq>daily</changefreq>
159159
</url>
160160

161161

162162

163163
<url>
164164
<loc>/17_二叉查找树/binary_search_tree/</loc>
165-
<lastmod>2018-05-27</lastmod>
165+
<lastmod>2018-05-29</lastmod>
166166
<changefreq>daily</changefreq>
167167
</url>
168168

169169

170170

171171
<url>
172172
<loc>/18_图与图的遍历/graph/</loc>
173-
<lastmod>2018-05-27</lastmod>
173+
<lastmod>2018-05-29</lastmod>
174174
<changefreq>daily</changefreq>
175175
</url>
176176

177177

178178

179179
<url>
180180
<loc>/19_python内置常用算法和数据结构/builtins/</loc>
181-
<lastmod>2018-05-27</lastmod>
181+
<lastmod>2018-05-29</lastmod>
182182
<changefreq>daily</changefreq>
183183
</url>
184184

185185

186186

187187
<url>
188188
<loc>/20_面试指南/interview/</loc>
189-
<lastmod>2018-05-27</lastmod>
189+
<lastmod>2018-05-29</lastmod>
190190
<changefreq>daily</changefreq>
191191
</url>
192192

0 commit comments

Comments
 (0)