Home
Related Problems
Invert Binary Tree
Easy
Trees
•
Grind 75
NeetCode 150
marc30
Given the root of a binary tree, invert the tree, and return its root. To invert a binary tree, swap every left node with its corresponding right node.
Constraints:
The number of nodes in the tree is in the range [0, 100]
-100 <= Node.val <= 100
Show Test Cases
Show Solution