Skip to content

Commit c1db019

Browse files
author
xingdali
committed
修改格式
1 parent c7645d9 commit c1db019

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

‎数据结构篇/二叉树.md‎

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,35 @@
22

33
### 二叉树遍历
44

5-
**前序遍历****先访问根节点**,再前序遍历左子树,再前序遍历右子树**中序遍历**:先中序遍历左子树,**再访问根节点**,再中序遍历右子树**后序遍历**:先后序遍历左子树,再后序遍历右子树,**再访问根节点**
5+
**前序遍历****先访问根节点**,再前序遍历左子树,再前序遍历右子树**中序遍历**:先中序遍历左子树,**再访问根节点**,再中序遍历右子树**后序遍历**:先后序遍历左子树,再后序遍历右子树,**再访问根节点**
66

77
注意点:
88

99
- 以根访问顺序决定是什么遍历
1010
- 左子树都是优先右子树
1111

12-
#####树结构
12+
#### 树结构
1313

14-
```js
14+
```tsx
1515
function TreeNode(val){
1616
this.val=val;
1717
this.left=null;
1818
this.right=null;
1919
}
20+
21+
classTreeNode{// es6 + ts
22+
val:any
23+
left:TreeNode|null
24+
right:TreeNode|null
25+
constructor(val:any){
26+
this.val=val
27+
this.left=null
28+
this.right=null
29+
}
30+
}
2031
```
2132

22-
#####根据数组构建二叉树
33+
#### 根据数组构建二叉树
2334

2435
```js
2536
constbuildTreeByArray=function (array, index){
@@ -44,7 +55,7 @@ const arr = [1,2,3,null,4,5,null,null,null,6,7];
4455
let root =binaryTree(arr);
4556
```
4657

47-
#####前序递归
58+
#### 前序递归
4859

4960
```js
5061
functionpreOrder(root){
@@ -57,7 +68,7 @@ function preOrder(root){
5768
}
5869
```
5970

60-
#####前序非递归
71+
#### 前序非递归
6172

6273
```js
6374
constpreOrderTraversal=function (root){
@@ -81,7 +92,7 @@ const preOrderTraversal = function (root){
8192
}
8293
```
8394

84-
#####中序递归
95+
#### 中序递归
8596

8697
```js
8798
functioninOrder(root){
@@ -94,7 +105,7 @@ function inOrder(root){
94105
}
95106
```
96107

97-
#####中序非递归
108+
#### 中序非递归
98109

99110
```js
100111
constinOrderTraversal=function(root){
@@ -117,7 +128,7 @@ const inOrderTraversal = function(root){
117128
}
118129
```
119130

120-
#####后序递归
131+
#### 后序递归
121132

122133
```js
123134
functionpostOrder(root){
@@ -130,7 +141,7 @@ function postOrder(root){
130141
}
131142
```
132143

133-
#####后序非递归
144+
#### 后序非递归
134145

135146
```js
136147
constpostOrderTraversal=function(root){//翻转非递归 后序遍历
@@ -154,7 +165,7 @@ const postOrderTraversal = function(root){//翻转非递归 后序遍历
154165
}
155166
```
156167

157-
##### 深度搜索
168+
####深度搜索DFS
158169

159170
```js
160171
constdfsUpToDown=function(root){//递归,从上到下
@@ -194,7 +205,7 @@ const divideAndConquer = function(node){//分治法
194205
}
195206
```
196207

197-
##### 广度搜索
208+
####广度搜索BFS
198209

199210
```js
200211
constbfs=function(root){

‎论文/论文FaaSNet-ali.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ RPC和数据流:构建了一个用户级,零copy的RPC库,实现请求流
8080

8181
4.2 FaaS应用工作负载
8282

83-
进程和启动:对比物联网应用和游戏应用
83+
进程和启动:对比物联网应用和游戏应用

0 commit comments

Comments
(0)