gary@interview:~/interview/coding/226-invert-binar….md$
$ cat ./coding/226-invert-binary-tree.md
[Coding]

226. Invert Binary Tree

────────────────────────────────────────────────────────────

226. Invert Binary Tree

# Definition for a binary tree node.
# class TreeNode:
#     def __init__(self, val=0, left=None, right=None):
#         self.val = val
#         self.left = left
#         self.right = right
class Solution:
    def invertTree(self, root: TreeNode) -> TreeNode:
        if not root:
            return root
        root.left, root.right = self.invertTree(root.right), self.invertTree(root.left)
        return root

--tags#Tree
$ ls ./coding/ | grep -v 226-invert-binary-tree
265. Paint House II256. Paint House143. Reorder List1762. Buildings With an Ocean View
← cd ../codingcd ~