feat: Add pythontutor blocks to the rest of the chapters (#1030)

* Fix Python code

* Add the pythontutor blocks of the chapter tree, heap, graph, searching, sorting, divide and conquer, dynamic programming and greedy.
Improve the pythontutor blocks of the chapter array and linkedlist and backtracking.
Add the tutorial of pythontutor in how-to-read section.

* Reduce the image's file size.
This commit is contained in:
Yudong Jin
2024-01-07 23:49:26 +08:00
committed by GitHub
parent ddd375af20
commit ee485372fe
56 changed files with 455 additions and 16 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

View File

@@ -189,9 +189,7 @@
**第一步:安装本地编程环境**。请参照附录所示的[教程](https://www.hello-algo.com/chapter_appendix/installation/)进行安装,如果已安装,则可跳过此步骤。
**第二步:克隆或下载代码仓库**。前往 [GitHub 仓库](https://github.com/krahets/hello-algo)。
如果已经安装 [Git](https://git-scm.com/downloads) ,可以通过以下命令克隆本仓库:
**第二步:克隆或下载代码仓库**。前往 [GitHub 仓库](https://github.com/krahets/hello-algo)。如果已经安装 [Git](https://git-scm.com/downloads) ,可以通过以下命令克隆本仓库:
```shell
git clone https://github.com/krahets/hello-algo.git
@@ -205,6 +203,10 @@ git clone https://github.com/krahets/hello-algo.git
![代码块与对应的源代码文件](suggestions.assets/code_md_to_repo.png)
除了本地运行代码,**网页版还支持 Python 代码的可视化运行**(基于 [pythontutor](https://pythontutor.com/) 实现)。如下图所示,你可以点击代码块下方的“可视化运行”来展开视图,观察算法代码的执行过程;也可以点击“全屏观看”,以获得更好的阅览体验。
![Python 代码的可视化运行](suggestions.assets/pythontutor_example.png)
## 在提问讨论中共同成长
在阅读本书时,请不要轻易跳过那些没学明白的知识点。**欢迎在评论区提出你的问题**,我和小伙伴们将竭诚为你解答,一般情况下可在两天内回复。