Merge branch 'krahets:master' into master

This commit is contained in:
Daniel 2022-12-27 16:50:54 +11:00 committed by GitHub
commit 4e95997386
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View file

@ -42,7 +42,7 @@ func printTree(root *TreeNode) {
printTree(root.right)
}
/* 函数(或称方法)*/
/* 函数 */
func function() int {
// do something...
return 0

View file

@ -38,7 +38,7 @@ comments: true
Node(int x) { val = x; }
}
/* 函数(或称方法) */
/* 函数 */
int function() {
// do something...
return 0;
@ -63,7 +63,7 @@ comments: true
Node(int x) : val(x), next(nullptr) {}
};
/* 函数(或称方法) */
/* 函数 */
int func() {
// do something...
return 0;
@ -87,7 +87,7 @@ comments: true
self.val = x # 结点值
self.next = None # 指向下一结点的指针(引用)
""" 函数(或称方法) """
""" 函数 """
def function():
# do something...
return 0
@ -113,7 +113,7 @@ comments: true
return &Node{val: val}
}
/* 函数(或称方法)*/
/* 函数 */
func function() int {
// do something...
return 0
@ -157,7 +157,7 @@ comments: true
Node(int x) { val = x; }
}
/* 函数(或称方法) */
/* 函数 */
int function()
{
// do something...

View file

@ -453,7 +453,7 @@ comments: true
```js title=""
/* 二叉树的数组表示 */
// 直接使用 null 来表示空位
let tree = [1, 2, 3, 4, 5, 6, 7, null, null, null, null, null, null, null, null]
let tree = [1, 2, 3, 4, null, 6, 7, 8, 9, null, null, 12, null, null, 15];
```
=== "TypeScript"
@ -461,7 +461,7 @@ comments: true
```typescript title=""
/* 二叉树的数组表示 */
// 直接使用 null 来表示空位
let tree = [1, 2, 3, 4, 5, 6, 7, null, null, null, null, null, null, null, null]
let tree: (number | null)[] = [1, 2, 3, 4, null, 6, 7, 8, 9, null, null, 12, null, null, 15];
```
=== "C"