Untitled

mail@pastecode.io avatar
unknown
c_cpp
a year ago
252 B
0
Indexable
Never
    void mirror(Node* root) {
        if (root == NULL) return;
        
        Node *tmp = root -> left;
        root -> left = root -> right;
        root -> right = tmp;
        
        mirror(root -> left);
        mirror(root -> right);
    }
};