struct TreeNode* invertTree(struct TreeNode* root){ if(!root) return NULL; struct TreeNode* node =root->left; root->left=invertTree(root->right); root->right=invertTree(node); return root; }
struct TreeNode* invertTree(struct TreeNode* root){ if(!root) return NULL; struct TreeNode* node =root->left; root->left=invertTree(root->right); root->right=invertTree(node); return root; }