Add sorce code blocks of C to the docs.

This commit is contained in:
krahets
2023-02-11 18:22:27 +08:00
parent d3ea84ba97
commit d1e1d76162
18 changed files with 78 additions and 206 deletions
+12 -10
View File
@@ -206,7 +206,9 @@ G. M. Adelson-Velsky 和 E. M. Landis 在其 1962 年发表的论文 "An algorit
=== "C"
```c title="avl_tree.c"
[class]{aVLTree}-[func]{height}
[class]{aVLTree}-[func]{updateHeight}
```
=== "C#"
@@ -276,9 +278,7 @@ G. M. Adelson-Velsky 和 E. M. Landis 在其 1962 年发表的论文 "An algorit
=== "C"
```c title="avl_tree.c"
[class]{aVLTree}-[func]{balanceFactor}
```
=== "C#"
@@ -370,7 +370,7 @@ AVL 树的独特之处在于「旋转 Rotation」的操作,其可 **在不影
=== "C"
```c title="avl_tree.c"
[class]{aVLTree}-[func]{rightRotate}
```
=== "C#"
@@ -442,9 +442,7 @@ AVL 树的独特之处在于「旋转 Rotation」的操作,其可 **在不影
=== "C"
```c title="avl_tree.c"
[class]{aVLTree}-[func]{leftRotate}
```
=== "C#"
@@ -537,7 +535,7 @@ AVL 树的独特之处在于「旋转 Rotation」的操作,其可 **在不影
=== "C"
```c title="avl_tree.c"
[class]{aVLTree}-[func]{rotate}
```
=== "C#"
@@ -615,9 +613,9 @@ AVL 树的独特之处在于「旋转 Rotation」的操作,其可 **在不影
=== "C"
```c title="avl_tree.c"
[class]{aVLTree}-[func]{insert}
[class]{aVLTree}-[func]{insertHelper}
```
=== "C#"
@@ -711,7 +709,11 @@ AVL 树的独特之处在于「旋转 Rotation」的操作,其可 **在不影
=== "C"
```c title="avl_tree.c"
[class]{aVLTree}-[func]{remove}
[class]{aVLTree}-[func]{removeHelper}
[class]{aVLTree}-[func]{getInOrderNext}
```
=== "C#"
+5 -3
View File
@@ -74,7 +74,7 @@ comments: true
=== "C"
```c title="binary_search_tree.c"
[class]{binarySearchTree}-[func]{search}
```
=== "C#"
@@ -145,7 +145,7 @@ comments: true
=== "C"
```c title="binary_search_tree.c"
[class]{binarySearchTree}-[func]{insert}
```
=== "C#"
@@ -253,7 +253,9 @@ comments: true
=== "C"
```c title="binary_search_tree.c"
[class]{binarySearchTree}-[func]{remove}
[class]{binarySearchTree}-[func]{getInOrderNext}
```
=== "C#"
+6 -2
View File
@@ -57,7 +57,7 @@ comments: true
=== "C"
```c title="binary_tree_bfs.c"
[class]{}-[func]{hierOrder}
```
=== "C#"
@@ -161,7 +161,11 @@ comments: true
=== "C"
```c title="binary_tree_dfs.c"
[class]{}-[func]{preOrder}
[class]{}-[func]{inOrder}
[class]{}-[func]{postOrder}
```
=== "C#"