Blind 75
Invert Binary Tree (medium)
Problem Statement
Given the root of a binary tree, invert it.
Example:
Given the following two binary trees:
Constraints:
- The number of nodes in both trees is in the range
[0, 100]
. - -100 <= Node.val <= 100
Try it yourself
Try solving this question here:
Python3
Python3