To my understanding, the statement is inconsistent with the title. The statement is to mirror the tree, not to invert the tree instead.
1 / \ 2 3 \ 4
4 / 2 3 \ / 1
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.