Skip to content

Commit b68aaa9

Browse files
committed
Deployed d18d5ea with MkDocs version: 0.17.3
1 parent 712b082 commit b68aaa9

21 files changed

+594
-583
lines changed

.DS_Store

6 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

03_链表/wnntest.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
# python linked_list.py
4+
when-changed . 'py.test -s linked_list.py'
5+
# when-changed . 'py.test -s double_link_list.py'
6+
# python double_link_list.py
Binary file not shown.
Binary file not shown.
Binary file not shown.

04_队列/array_queue.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self, maxsize):
4040
def push(self, value):
4141
if len(self) >= self.maxsize:
4242
raise FullError('queue full')
43-
self.array[self.head] = value
43+
self.array[self.head % self.maxsize] = value
4444
self.head += 1
4545

4646
def pop(self):
@@ -49,7 +49,7 @@ def pop(self):
4949
return value
5050

5151
def __len__(self):
52-
return self.head-self.tail
52+
return self.head - self.tail
5353

5454

5555
def test_queue():
@@ -68,10 +68,13 @@ def test_queue():
6868
assert q.pop() == 0
6969
assert q.pop() == 1
7070

71-
assert len(q) == 3
71+
q.push(5)
72+
73+
assert len(q) == 4
7274

7375
assert q.pop() == 2
7476
assert q.pop() == 3
7577
assert q.pop() == 4
78+
assert q.pop() == 5
7679

7780
assert len(q) == 0
8.47 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ <h2 id="_1">课程简介</h2>
262262
笔者尝试录制视频教程帮助 Python 初学者掌握常用算法和数据结构,提升开发技能。
263263
本教程是付费教程(文字内容和代码免费),因为笔者录制的过程中除了购买软件、手写板等硬件之外,业余需要花费很多时间和精力来录制视频、查资料、编写课件和代码,养家糊口不容易,希望大家体谅。</p>
264264
<h2 id="_2">链接</h2>
265+
<p>视频教程已经发布在网易云课堂和 csdn 学院,内容一致。</p>
265266
<p><a href="http://study.163.com/course/introduction.htm?courseId=1005526003">网易云课堂: Python数据结构与算法教程</a> 视频教程</p>
267+
<p><a href="https://edu.csdn.net/course/detail/8332">csdn 学院:Python数据结构与算法教程</a></p>
266268
<p><a href="http://ningning.today/python_data_structures_and_algorithms/">网上阅读《Python 算法与数据结构教程 》</a></p>
267269
<p><a href="https://github.com/PegasusWang/python_data_structures_and_algorithms">github 链接</a></p>
268270
<p><a href="http://python-data-structures-and-algorithms.readthedocs.io/zh/latest/">readthedoc 电子书下载</a></p>
@@ -407,7 +409,7 @@ <h2 id="_18">勘误</h2>
407409
<p>输出其实也是一种再学习的过程,中途需要查看大量资料、编写讲义、视频录制、代码编写等,难免有疏漏甚至错误之处。
408410
有出版社找过笔者想让我出书,一来自己对出书兴趣不大,另外感觉书籍相对视频不够直观,有错误也不能及时修改,打算直接把所有
409411
文字内容讲义和代码等放到 github 上,供大家免费查阅。</p>
410-
<p>如果你发现文字内容、代码内容或者视频内容有错误,欢迎在 github 上提 issue 讨论,或者直接提 Merge Request,我会修正相关内容,防止对读者产生误导(同时感谢认真学习并及时发现书中错误的同学)。</p>
412+
<p>如果你发现文字内容、代码内容或者视频内容有错误,欢迎在 github 上提 issue 讨论,或者直接提 Merge Request,我会修正相关内容,防止对读者产生误导(同时非常感谢认真学习并及时发现书中错误的同学)。</p>
411413
<h2 id="_19">本电子书制作和写作方式</h2>
412414
<p>使用 mkdocs 和 markdown 构建,使用 Python-Markdown-Math 完成数学公式。
413415
markdown 语法参考:http://xianbai.me/learn-md/article/about/readme.html</p>
@@ -480,5 +482,5 @@ <h2 id="_19">本电子书制作和写作方式</h2>
480482

481483
<!--
482484
MkDocs version : 0.17.3
483-
Build Date UTC : 2018-06-04 04:46:46
485+
Build Date UTC : 2018-06-06 01:13:36
484486
-->

search/search_index.json

Lines changed: 554 additions & 554 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-06-04</lastmod>
7+
<lastmod>2018-06-06</lastmod>
88
<changefreq>daily</changefreq>
99
</url>
1010

1111

1212

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

1919

2020

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

2727

2828

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

3535

3636

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

4343

4444

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

5151

5252

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

5959

6060

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

6767

6868

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

7575

7676

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

8383

8484

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

9191

9292

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

9999

100100

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

107107

108108

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

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

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

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

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

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

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

145145

146146

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

153153

154154

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

161161

162162

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

169169

170170

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

177177

178178

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

185185

186186

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

0 commit comments

Comments
 (0)