题目:
class Solution {
public:
void traversal(TreeNode* cur){
if(cur==nullptr) return;
swap(cur->left,cur->right); //从上换到下面就完事了
traversal(cur->left);
traversal(cur->right);
}
TreeNode* mirrorTree(TreeNode* root) {
traversal(root);
return root;
}
};