class Solution { public: //直接交换的左右 void mirror(TreeNode* root) { if (root == NULL) return; swap (root -> left, root -> right); mirror (root -> left); mirror (root -> right); } };