
Invert a binary tree.
Example
Input:
1 |
4 |
Output:
1 |
4 |
Code
1 |
public class { |
1 |
public TreeNode invertTree(TreeNode root) { |

Invert a binary tree.
Input:
1 |
4 |
Output:
1 |
4 |
1 |
public class { |
1 |
public TreeNode invertTree(TreeNode root) { |
近期评论