Skip to content

Commit a35e425

Browse files
fix build
1 parent c216053 commit a35e425

File tree

1 file changed

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

1 file changed

+11
-5
lines changed

src/main/java/com/fishercoder/solutions/_951.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,20 @@
1919
public class _951 {
2020
public static class Solution1 {
2121
public boolean flipEquiv(TreeNode root1, TreeNode root2) {
22-
if (root1 == null && root2 == null) return true;
23-
if (root1 == null || root2 == null) return false;
22+
if (root1 == null && root2 == null) {
23+
return true;
24+
}
25+
if (root1 == null || root2 == null) {
26+
return false;
27+
}
2428

25-
if (root1.val != root2.val) return false;
29+
if (root1.val != root2.val) {
30+
return false;
31+
}
2632

2733
return (
28-
(flipEquiv(root1.left, root2.left) && flipEquiv(root1.right, root2.right)) ||
29-
(flipEquiv(root1.left, root2.right) && flipEquiv(root1.right, root2.left))
34+
(flipEquiv(root1.left, root2.left) && flipEquiv(root1.right, root2.right))
35+
|| (flipEquiv(root1.left, root2.right) && flipEquiv(root1.right, root2.left))
3036
);
3137
}
3238
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy