Problem
Given theroot of a binary tree, invert the tree, and return its root.
Examples
Constraints
- The number of nodes in the tree is in the range [0, 100]
- -100 <= Node.val <= 100
Tested Python solution for LeetCode 226 with 15 pytest cases. Generate a practice environment with lcpy.
root of a binary tree, invert the tree, and return its root.