Remove incomplete zig code from docs. (#1837)

This commit is contained in:
Yudong Jin
2025-12-31 19:47:59 +08:00
committed by GitHub
parent 2778a6f9c7
commit 10f76bd59a
68 changed files with 0 additions and 1343 deletions

View File

@@ -361,12 +361,6 @@ The related code is as follows:
end
```
=== "Zig"
```zig title=""
```
## Calculation Method
The calculation method for space complexity is roughly the same as for time complexity, except that the statistical object is changed from "number of operations" to "size of space used".
@@ -529,12 +523,6 @@ Observe the following code. The "worst case" in worst-case space complexity has
end
```
=== "Zig"
```zig title=""
```
**In recursive functions, it is necessary to count the stack frame space**. Observe the following code:
=== "Python"
@@ -807,12 +795,6 @@ Observe the following code. The "worst case" in worst-case space complexity has
end
```
=== "Zig"
```zig title=""
```
The time complexity of both functions `loop()` and `recur()` is $O(n)$, but their space complexities are different.
- The function `loop()` calls `function()` $n$ times in a loop. In each iteration, `function()` returns and releases its stack frame space, so the space complexity remains $O(1)$.