Tag: 226

  • LeetCode: 226 Invert Binary Tree

    Invert a binary tree. Example: Input: 4 / \ 2 7 / \ / \ 1 3 6 9 Output: 4 / \ 7 2 / \ / \ 9 6 3 1 问题 翻转一棵二叉树。 解决方案 1 递归方法 Approach 1 / 方法 1 This solution uses a recursive approach. The…