Skip to content

Commit 363a2bf

Browse files
edit 156
1 parent 2664f27 commit 363a2bf

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
public class _156 {
2626

2727
public TreeNode upsideDownBinaryTree(TreeNode root) {
28-
if (root == null || root.left == null && root.right == null)
28+
if (root == null || root.left == null && root.right == null) {
2929
return root;
30+
}
3031
TreeNode newRoot = upsideDownBinaryTree(root.left);
3132
root.left.left = root.right;
3233
root.left.right = root;

0 commit comments

Comments
 (0)