Add Zig code blocks.

This commit is contained in:
Yudong Jin
2023-02-01 22:03:04 +08:00
parent 6cd6d5589e
commit 7ce7386bab
25 changed files with 599 additions and 0 deletions

View File

@@ -208,6 +208,12 @@ comments: true
}
```
=== "Zig"
```zig title="binary_tree_bfs.zig"
```
## 7.2.2. 前序、中序、后序遍历
相对地,前、中、后序遍历皆属于「深度优先遍历 Depth-First Traversal」其体现着一种“先走到尽头再回头继续”的回溯遍历方式。
@@ -503,6 +509,12 @@ comments: true
}
```
=== "Zig"
```zig title="binary_tree_dfs.zig"
```
!!! note
使用循环一样可以实现前、中、后序遍历,但代码相对繁琐,有兴趣的同学可以自行实现。