Merge branch 'master' of github.com:krahets/hello-algo

This commit is contained in:
Yudong Jin
2022-12-27 12:15:10 +08:00
7 changed files with 543 additions and 5 deletions

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"