更新 0106.从中序与后序遍历序列构造二叉树 排版格式修复

This commit is contained in:
jinbudaily
2023-07-21 18:00:07 +08:00
parent bf6c4e7f7b
commit fe93239007
2 changed files with 37 additions and 41 deletions

View File

@@ -306,7 +306,7 @@ public:
### Java
#### 0112.路径总和
0112.路径总和
```java
class solution {
@@ -424,7 +424,7 @@ class solution {
}
```
#### 0113.路径总和-ii
0113.路径总和-ii
```java
class solution {
@@ -533,7 +533,7 @@ class Solution {
### Python
#### 0112.路径总和
0112.路径总和
(版本一) 递归
```python
@@ -620,7 +620,7 @@ class Solution:
#### 0113.路径总和-ii
0113.路径总和-ii
(版本一) 递归
```python
@@ -723,7 +723,7 @@ class Solution:
```
### Go
#### 112. 路径总和
112. 路径总和
```go
//递归法
@@ -748,7 +748,7 @@ func hasPathSum(root *TreeNode, targetSum int) bool {
}
```
#### 113. 路径总和 II
113. 路径总和 II
```go
/**
@@ -790,7 +790,7 @@ func traverse(node *TreeNode, result *[][]int, currPath *[]int, targetSum int) {
### Javascript
#### 0112.路径总和
0112.路径总和
**递归**
@@ -854,7 +854,7 @@ let hasPathSum = function(root, targetSum) {
};
```
#### 0113.路径总和-ii
0113.路径总和-ii
**递归**
@@ -954,7 +954,7 @@ let pathSum = function(root, targetSum) {
### TypeScript
#### 0112.路径总和
0112.路径总和
**递归法:**
@@ -1036,7 +1036,7 @@ function hasPathSum(root: TreeNode | null, targetSum: number): boolean {
};
```
#### 0112.路径总和 ii
0112.路径总和 ii
**递归法:**
@@ -1074,7 +1074,7 @@ function pathSum(root: TreeNode | null, targetSum: number): number[][] {
### Swift
#### 0112.路径总和
0112.路径总和
**递归**
@@ -1143,7 +1143,7 @@ func hasPathSum(_ root: TreeNode?, _ targetSum: Int) -> Bool {
}
```
#### 0113.路径总和 II
0113.路径总和 II
**递归**
@@ -1196,7 +1196,8 @@ func traversal(_ cur: TreeNode?, count: Int) {
### C
#### 0112.路径总和
0112.路径总和
递归法:
```c
@@ -1254,7 +1255,7 @@ bool hasPathSum(struct TreeNode* root, int targetSum){
}
```
#### 0113.路径总和 II
0113.路径总和 II
```c
int** ret;
@@ -1321,7 +1322,7 @@ int** pathSum(struct TreeNode* root, int targetSum, int* returnSize, int** retur
### Scala
#### 0112.路径总和
0112.路径总和
**递归:**
@@ -1371,7 +1372,7 @@ object Solution {
}
```
#### 0113.路径总和 II
0113.路径总和 II
**递归:**
@@ -1409,7 +1410,7 @@ object Solution {
### Rust
#### 0112.路径总和
0112.路径总和
递归:
@@ -1463,7 +1464,7 @@ impl Solution {
}
```
#### 0113.路径总和-ii
0113.路径总和-ii
```rust
impl Solution {
@@ -1516,4 +1517,3 @@ impl Solution {
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
</a>