Skip to content

Commit a838ab3

Browse files
committed
Deployed 154168f with MkDocs version: 0.17.4
1 parent aa2c017 commit a838ab3

21 files changed

+594
-660
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_链表/linked_list.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ def append(self, value): # O(1)
4343
self.length += 1
4444

4545
def appendleft(self, value):
46+
if self.maxsize is not None and len(self) > self.maxsize:
47+
raise Exception('LinkedList is Full')
4648
headnode = self.root.next
4749
node = Node(value)
4850
self.root.next = node
@@ -100,6 +102,9 @@ def popleft(self): # O(1)
100102
self.root.next = headnode.next
101103
self.length -= 1
102104
value = headnode.value
105+
106+
if self.tailnode is headnode: # 勘误:增加单节点删除 tailnode 处理
107+
self.tailnode = None
103108
del headnode
104109
return value
105110

@@ -138,6 +143,12 @@ def test_linked_list():
138143
assert len(ll) == 2
139144
assert list(ll) == [1, 3]
140145

146+
assert ll.popleft() == 1
147+
assert list(ll) == [3]
148+
ll.popleft()
149+
assert len(ll) == 0
150+
assert ll.tailnode is None
151+
141152
ll.clear()
142153
assert len(ll) == 0
143154

03_链表/wnntest.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
-6.74 KB
Binary file not shown.
-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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,6 @@ <h2 id="_20">本电子书制作和写作方式</h2>
510510
</html>
511511

512512
<!--
513-
MkDocs version : 0.17.3
514-
Build Date UTC : 2018-06-16 07:56:59
513+
MkDocs version : 0.17.4
514+
Build Date UTC : 2018-06-24 05:12:15
515515
-->

search/search_index.json

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

sitemap.xml

Lines changed: 24 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,194 +1,123 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3-
4-
53
<url>
64
<loc>/</loc>
7-
<lastmod>2018-06-16</lastmod>
5+
<lastmod>2018-06-24</lastmod>
86
<changefreq>daily</changefreq>
97
</url>
10-
11-
12-
138
<url>
149
<loc>/00_课程简介之笨方法学算法/why_and_how_to_learn/</loc>
15-
<lastmod>2018-06-16</lastmod>
10+
<lastmod>2018-06-24</lastmod>
1611
<changefreq>daily</changefreq>
1712
</url>
18-
19-
20-
2113
<url>
2214
<loc>/01_抽象数据类型和面向对象编程/ADT_OOP/</loc>
23-
<lastmod>2018-06-16</lastmod>
15+
<lastmod>2018-06-24</lastmod>
2416
<changefreq>daily</changefreq>
2517
</url>
26-
27-
28-
2918
<url>
3019
<loc>/02_数组和列表/array_and_list/</loc>
31-
<lastmod>2018-06-16</lastmod>
20+
<lastmod>2018-06-24</lastmod>
3221
<changefreq>daily</changefreq>
3322
</url>
34-
35-
36-
3723
<url>
3824
<loc>/03_链表/linked_list/</loc>
39-
<lastmod>2018-06-16</lastmod>
25+
<lastmod>2018-06-24</lastmod>
4026
<changefreq>daily</changefreq>
4127
</url>
42-
43-
44-
4528
<url>
4629
<loc>/04_队列/queue/</loc>
47-
<lastmod>2018-06-16</lastmod>
30+
<lastmod>2018-06-24</lastmod>
4831
<changefreq>daily</changefreq>
4932
</url>
50-
51-
52-
5333
<url>
5434
<loc>/05_栈/stack/</loc>
55-
<lastmod>2018-06-16</lastmod>
35+
<lastmod>2018-06-24</lastmod>
5636
<changefreq>daily</changefreq>
5737
</url>
58-
59-
60-
6138
<url>
6239
<loc>/06_算法分析/big_o/</loc>
63-
<lastmod>2018-06-16</lastmod>
40+
<lastmod>2018-06-24</lastmod>
6441
<changefreq>daily</changefreq>
6542
</url>
66-
67-
68-
6943
<url>
7044
<loc>/07_哈希表/hashtable/</loc>
71-
<lastmod>2018-06-16</lastmod>
45+
<lastmod>2018-06-24</lastmod>
7246
<changefreq>daily</changefreq>
7347
</url>
74-
75-
76-
7748
<url>
7849
<loc>/08_字典/dict/</loc>
79-
<lastmod>2018-06-16</lastmod>
50+
<lastmod>2018-06-24</lastmod>
8051
<changefreq>daily</changefreq>
8152
</url>
82-
83-
84-
8553
<url>
8654
<loc>/09_集合/set/</loc>
87-
<lastmod>2018-06-16</lastmod>
55+
<lastmod>2018-06-24</lastmod>
8856
<changefreq>daily</changefreq>
8957
</url>
90-
91-
92-
9358
<url>
9459
<loc>/10_递归/recursion/</loc>
95-
<lastmod>2018-06-16</lastmod>
60+
<lastmod>2018-06-24</lastmod>
9661
<changefreq>daily</changefreq>
9762
</url>
98-
99-
100-
10163
<url>
10264
<loc>/11_线性查找与二分查找/search/</loc>
103-
<lastmod>2018-06-16</lastmod>
65+
<lastmod>2018-06-24</lastmod>
10466
<changefreq>daily</changefreq>
10567
</url>
106-
107-
108-
10968
<url>
11069
<loc>/12_基本排序算法/basic_sort/</loc>
111-
<lastmod>2018-06-16</lastmod>
70+
<lastmod>2018-06-24</lastmod>
11271
<changefreq>daily</changefreq>
11372
</url>
114-
115-
116-
117-
11873
<url>
11974
<loc>/13_高级排序算法/advanced_sorting/</loc>
120-
<lastmod>2018-06-16</lastmod>
75+
<lastmod>2018-06-24</lastmod>
12176
<changefreq>daily</changefreq>
12277
</url>
123-
12478
<url>
12579
<loc>/13_高级排序算法/merge_sort/</loc>
126-
<lastmod>2018-06-16</lastmod>
80+
<lastmod>2018-06-24</lastmod>
12781
<changefreq>daily</changefreq>
12882
</url>
129-
13083
<url>
13184
<loc>/13_高级排序算法/quick_sort/</loc>
132-
<lastmod>2018-06-16</lastmod>
85+
<lastmod>2018-06-24</lastmod>
13386
<changefreq>daily</changefreq>
13487
</url>
135-
136-
137-
138-
13988
<url>
14089
<loc>/14_树与二叉树/tree/</loc>
141-
<lastmod>2018-06-16</lastmod>
90+
<lastmod>2018-06-24</lastmod>
14291
<changefreq>daily</changefreq>
14392
</url>
144-
145-
146-
14793
<url>
14894
<loc>/15_堆与堆排序/heap_and_heapsort/</loc>
149-
<lastmod>2018-06-16</lastmod>
95+
<lastmod>2018-06-24</lastmod>
15096
<changefreq>daily</changefreq>
15197
</url>
152-
153-
154-
15598
<url>
15699
<loc>/16_优先级队列/priority_queue/</loc>
157-
<lastmod>2018-06-16</lastmod>
100+
<lastmod>2018-06-24</lastmod>
158101
<changefreq>daily</changefreq>
159102
</url>
160-
161-
162-
163103
<url>
164104
<loc>/17_二叉查找树/binary_search_tree/</loc>
165-
<lastmod>2018-06-16</lastmod>
105+
<lastmod>2018-06-24</lastmod>
166106
<changefreq>daily</changefreq>
167107
</url>
168-
169-
170-
171108
<url>
172109
<loc>/18_图与图的遍历/graph/</loc>
173-
<lastmod>2018-06-16</lastmod>
110+
<lastmod>2018-06-24</lastmod>
174111
<changefreq>daily</changefreq>
175112
</url>
176-
177-
178-
179113
<url>
180114
<loc>/19_python内置常用算法和数据结构/builtins/</loc>
181-
<lastmod>2018-06-16</lastmod>
115+
<lastmod>2018-06-24</lastmod>
182116
<changefreq>daily</changefreq>
183117
</url>
184-
185-
186-
187118
<url>
188119
<loc>/20_面试指南/interview/</loc>
189-
<lastmod>2018-06-16</lastmod>
120+
<lastmod>2018-06-24</lastmod>
190121
<changefreq>daily</changefreq>
191122
</url>
192-
193-
194123
</urlset>

0 commit comments

Comments
 (0)