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
+12
View File
@@ -232,6 +232,12 @@ comments: true
}
```
=== "Zig"
```zig title="bubble_sort.zig"
```
## 11.2.2. 算法特性
**时间复杂度 $O(n^2)$** :各轮「冒泡」遍历的数组长度为 $n - 1$ , $n - 2$ , $\cdots$ , $2$ , $1$ 次,求和为 $\frac{(n - 1) n}{2}$ ,因此使用 $O(n^2)$ 时间。
@@ -458,3 +464,9 @@ comments: true
}
}
```
=== "Zig"
```zig title="bubble_sort.zig"
```