标签:class rtt leetcode solution roo public node pre treenode
class Solution { public: TreeNode* invertTree(TreeNode* root) { if(root == NULL) return NULL; TreeNode* tmp = invertTree(root->left); root->left = invertTree(root->right); root->right = tmp; return root; } };
leetcode 226. Invert Binary Tree
标签:class rtt leetcode solution roo public node pre treenode
原文地址:https://www.cnblogs.com/ymjyqsx/p/9662525.html