Squash the language code blocks and fix list.md (#865)

This commit is contained in:
Yudong Jin
2023-10-16 12:06:00 -05:00
committed by GitHub
parent 346c8451de
commit faa44fecd2
52 changed files with 409 additions and 10482 deletions
@@ -57,101 +57,9 @@
为了提升查询 $m$ 的效率,我们借助一个哈希表 `hmap` 来存储数组 `inorder` 中元素到索引的映射。
=== "Python"
```python title="build_tree.py"
[class]{}-[func]{dfs}
[class]{}-[func]{build_tree}
```
=== "C++"
```cpp title="build_tree.cpp"
[class]{}-[func]{dfs}
[class]{}-[func]{buildTree}
```
=== "Java"
```java title="build_tree.java"
[class]{build_tree}-[func]{dfs}
[class]{build_tree}-[func]{buildTree}
```
=== "C#"
```csharp title="build_tree.cs"
[class]{build_tree}-[func]{DFS}
[class]{build_tree}-[func]{BuildTree}
```
=== "Go"
```go title="build_tree.go"
[class]{}-[func]{dfsBuildTree}
[class]{}-[func]{buildTree}
```
=== "Swift"
```swift title="build_tree.swift"
[class]{}-[func]{dfs}
[class]{}-[func]{buildTree}
```
=== "JS"
```javascript title="build_tree.js"
[class]{}-[func]{dfs}
[class]{}-[func]{buildTree}
```
=== "TS"
```typescript title="build_tree.ts"
[class]{}-[func]{dfs}
[class]{}-[func]{buildTree}
```
=== "Dart"
```dart title="build_tree.dart"
[class]{}-[func]{dfs}
[class]{}-[func]{buildTree}
```
=== "Rust"
```rust title="build_tree.rs"
[class]{}-[func]{dfs}
[class]{}-[func]{build_tree}
```
=== "C"
```c title="build_tree.c"
[class]{}-[func]{dfs}
[class]{}-[func]{buildTree}
```
=== "Zig"
```zig title="build_tree.zig"
[class]{}-[func]{dfs}
[class]{}-[func]{buildTree}
```
```src
[file]{build_tree}-[class]{}-[func]{build_tree}
```
下图展示了构建二叉树的递归过程,各个节点是在向下“递”的过程中建立的,而各条边(即引用)是在向上“归”的过程中建立的。