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

Commit11c4cee

Browse files
refactor 226
1 parentc39f7d2 commit11c4cee

File tree

1 file changed

+2
-2
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+2
-2
lines changed

‎src/main/java/com/fishercoder/solutions/_226.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public static class Solution3 {
5555
* A more concise version
5656
*/
5757
publicTreeNodeinvertTree(TreeNoderoot) {
58-
if (root ==null || (root.left ==null &&root.right ==null)) {
59-
returnroot;
58+
if (root ==null) {
59+
returnnull;
6060
}
6161
TreeNodetemp =root.left;
6262
root.left =invertTree(root.right);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp