二叉樹專題-lintcode翻轉二叉樹

利用遞歸,交換左右子樹便可,屬於容易題spa class Solution { public: /** * @param root: a TreeNode, the root of the binary tree * @return: nothing */ void invertBinaryTree(TreeNode *root) {
相關文章
相關標籤/搜索