Skip to content

Commit 7ada502

Browse files
committed
Deployed fb2309a with MkDocs version: 0.17.3
1 parent 98e4688 commit 7ada502

File tree

7 files changed

+37
-33
lines changed

7 files changed

+37
-33
lines changed

14_树与二叉树/tree/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ <h1 id="_2">树</h1>
254254
<ul>
255255
<li>根节点(root): 树的最上层的节点,任何非空的树都有一个节点</li>
256256
<li>路径(path): 从起始节点到终止节点经历过的边</li>
257-
<li>父亲(parent):除了根节点,每个节点的上一层又边连接的节点就是它的父亲(节点)</li>
257+
<li>父亲(parent):除了根节点,每个节点的上一层边连接的节点就是它的父亲(节点)</li>
258258
<li>孩子(children): 每个节点由边指向的下一层节点</li>
259259
<li>兄弟(siblings): 同一个父亲并且处在同一层的节点</li>
260260
<li>子树(subtree): 每个节点包含它所有的后代组成的子树</li>
@@ -426,10 +426,12 @@ <h1 id="_8">练习题</h1>
426426
<li>请你完成二叉树的中序遍历和后序遍历以及单元测试</li>
427427
<li>树的遍历我们用了 print,请你尝试换成一个 callback,这样就能自定义处理树节点的方式了。</li>
428428
<li>请问树的遍历操作时间复杂度是多少?假设它的 size 是 n</li>
429+
<li>你能用非递归的方式来实现树的遍历吗?我们知道计算机内部使用了 stack,如果我们自己模拟如何实现?请你尝试完成</li>
429430
</ul>
430431
<h1 id="_9">延伸阅读</h1>
431432
<ul>
432433
<li>《Data Structures and Algorithms in Python》 13 章 Binary Trees</li>
434+
<li><a href="https://www.geeksforgeeks.org/iterative-preorder-traversal/">https://www.geeksforgeeks.org/iterative-preorder-traversal/</a></li>
433435
</ul>
434436

435437
</div>

15_堆与堆排序/heap_and_heapsort/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ <h1 id="_2">堆的操作</h1>
252252
<li>获取并移除根节点的值。每次我们都可以获取最大值或者最小值。这个时候需要把底层最右边的节点值替换到 root 节点之后
253253
执行 sift-down 操作。</li>
254254
</ul>
255+
<p><img alt="" src="../siftup.png" />
256+
<img alt="" src="../siftdown.png" /></p>
255257
<h1 id="_3">堆的表示</h1>
256258
<p>上一章我们用一个节点类和二叉树类表示树,这里其实用数组就能实现堆。</p>
257259
<p><img alt="" src="../heap_array.png" /></p>
@@ -349,7 +351,7 @@ <h1 id="_6">练习题</h1>
349351
<li>这里我用最大堆实现了一个 heapsort_reverse 函数,请你实现一个正序排序的函数。似乎不止一种方式</li>
350352
<li>请你实现一个最小堆,你需要修改那些代码呢?</li>
351353
<li>我们实现的堆排序是 inplace 的吗,如果不是,你能改成 inplace 的吗?</li>
352-
<li>堆排序的时间复杂度是多少? siftup 和 siftdown 的时间复杂度是多少?</li>
354+
<li>堆排序的时间复杂度是多少? siftup 和 siftdown 的时间复杂度是多少?(小提示:考虑树的高度,它决定了操作次数)</li>
353355
</ul>
354356
<h1 id="_7">延伸阅读</h1>
355357
<ul>

15_堆与堆排序/siftdown.png

114 KB
Loading

15_堆与堆排序/siftup.png

105 KB
Loading

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,5 +479,5 @@ <h2 id="_19">本电子书制作和写作方式</h2>
479479

480480
<!--
481481
MkDocs version : 0.17.3
482-
Build Date UTC : 2018-05-19 13:43:56
482+
Build Date UTC : 2018-05-23 01:16:25
483483
-->

search/search_index.json

Lines changed: 6 additions & 6 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-19</lastmod>
7+
<lastmod>2018-05-23</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-19</lastmod>
15+
<lastmod>2018-05-23</lastmod>
1616
<changefreq>daily</changefreq>
1717
</url>
1818

1919

2020

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

2727

2828

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

3535

3636

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

4343

4444

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

5151

5252

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

5959

6060

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

6767

6868

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

7575

7676

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

8383

8484

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

9191

9292

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

9999

100100

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

107107

108108

109109
<url>
110110
<loc>/12_基本排序算法/basic_sort/</loc>
111-
<lastmod>2018-05-19</lastmod>
111+
<lastmod>2018-05-23</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-19</lastmod>
120+
<lastmod>2018-05-23</lastmod>
121121
<changefreq>daily</changefreq>
122122
</url>
123123

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

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

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

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

145145

146146

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

153153

154154

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

161161

162162

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

169169

170170

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

177177

178178

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

185185

186186

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

0 commit comments

Comments
 (0)