Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4981f7b

Browse files
committed
fix: fix 101
1 parentd54abce commit4981f7b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎note/101/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ Bonus points if you could solve it both recursively and iteratively.
4747
*/
4848
classSolution {
4949
publicbooleanisSymmetric(TreeNoderoot) {
50-
return root==null||isSymmetricHelper(root.left, root.right);
50+
return root==null||helper(root.left, root.right);
5151
}
5252

5353
publicbooleanhelper(TreeNodeleft,TreeNoderight) {
5454
if (left==null|| right==null)return left== right;
5555
if (left.val!= right.val)returnfalse;
56-
returnisSymmetricHelper(left.left, right.right)&&isSymmetricHelper(left.right, right.left);
56+
returnhelper(left.left, right.right)&&helper(left.right, right.left);
5757
}
5858
}
5959
```

‎src/com/blankj/easy/_101/Solution.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
*/
1616
publicclassSolution {
1717
// public boolean isSymmetric(TreeNode root) {
18-
// return root == null ||isSymmetricHelper(root.left, root.right);
18+
// return root == null ||helper(root.left, root.right);
1919
// }
2020
//
2121
// private boolean helper(TreeNode left, TreeNode right) {
2222
// if (left == null || right == null) return left == right;
2323
// if (left.val != right.val) return false;
24-
// returnisSymmetricHelper(left.left, right.right) &&isSymmetricHelper(left.right, right.left);
24+
// returnhelper(left.left, right.right) &&helper(left.right, right.left);
2525
// }
2626

2727
publicbooleanisSymmetric(TreeNoderoot) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp