mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-13 07:46:06 +00:00
build
This commit is contained in:
@@ -147,12 +147,6 @@ comments: true
|
||||
[class]{}-[func]{level_order}
|
||||
```
|
||||
|
||||
=== "Zig"
|
||||
|
||||
```zig title="binary_tree_bfs.zig"
|
||||
[class]{}-[func]{levelOrder}
|
||||
```
|
||||
|
||||
### 2. 計算量分析
|
||||
|
||||
- **時間計算量は$O(n)$**: すべてのノードが一度ずつ訪問され、$O(n)$の時間がかかります。ここで$n$はノード数です。
|
||||
@@ -371,16 +365,6 @@ comments: true
|
||||
[class]{}-[func]{post_order}
|
||||
```
|
||||
|
||||
=== "Zig"
|
||||
|
||||
```zig title="binary_tree_dfs.zig"
|
||||
[class]{}-[func]{preOrder}
|
||||
|
||||
[class]{}-[func]{inOrder}
|
||||
|
||||
[class]{}-[func]{postOrder}
|
||||
```
|
||||
|
||||
!!! tip
|
||||
|
||||
深度優先探索は反復に基づいても実装できます。興味のある読者は自分で学習してください。
|
||||
|
||||
Reference in New Issue
Block a user