We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3635744 + 4fcfd0b commit 9485746Copy full SHA for 9485746
java/0226-invert-binary-tree.java
@@ -4,7 +4,6 @@ public TreeNode invertTree(TreeNode root) {
4
if (root == null) return null;
5
TreeNode node = new TreeNode(root.val);
6
node.right = invertTree(root.left);
7
- node.val = root.val;
8
node.left = invertTree(root.right);
9
return node;
10
}
0 commit comments