【leetcode】二叉树的镜像

typedef struct TreeNode TreeNode;

struct TreeNode* mirrorTree(struct TreeNode* root){
    // recursion resolution
    if (root == NULL) return NULL;
    TreeNode *temp = root->left;
    root->left = mirrorTree(root->right);
    root->right = mirrorTree(temp);
    return root;
}
原文地址:https://www.cnblogs.com/ganxiang/p/13551027.html