代码重构 【Github Actions】

This commit is contained in:
github-actions[bot]
2021-07-29 02:33:38 +00:00
parent 5a5325b0c8
commit a8b66cd5ae
38 changed files with 110 additions and 159 deletions

View File

@@ -34,7 +34,7 @@ class Solution {
TreeNode cur = new TreeNode(-1);
cur = root;
Stack<TreeNode> stack = new Stack<>();
while (!stack.isEmpty() || cur != null) {
while (!stack.isEmpty() || cur != null) {
//找到当前应该遍历的那个节点
while (cur != null) {
stack.push(cur);
@@ -47,7 +47,7 @@ class Solution {
cur = temp.right;
}
return arr;
}
}
}
```
@@ -104,4 +104,4 @@ func inorderTraversal(root *TreeNode) []int {
}
```
###
###