ICode9

精准搜索请尝试: 精确搜索
  • 226. Invert Binary Tree(翻转树)2019-03-20 14:53:38

    Invert a binary tree. Example: Input: 4 / \ 2 7 / \ / \1 3 6 9 Output: 4 / \ 7 2 / \ / \9 6 3 1 Trivia:This problem was inspired by this original tweet by Max Howell: Google: 90% of our engineers use the softw

  • 226. Invert Binary Tree2019-03-15 15:48:17

        Solution1:  class Solution {     public TreeNode invertTree(TreeNode root) {         if (root == null) return null;         TreeNode tmp = root.left;         root.left = invertTree(root.right);         root.right =

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有