void mirror(Node* node)
{
// Your Code Here
if(node == NULL) return ;
Node* leftnode = node->left;
node->left = node->right;
node->right = leftnode;
mirror(node->left);
mirror(node->right);
}
void mirror(Node* node)
{
// Your Code Here
if(node == NULL) return ;
Node* leftnode = node->left;
node->left = node->right;
node->right = leftnode;
mirror(node->left);
mirror(node->right);
}
本文标题:Mirror Tree
本文链接:https://www.haomeiwen.com/subject/xqvriftx.html
网友评论