LeetCode 226: Invert Binary Tree
Problem Restatement We are given the root of a binary tree. We need to invert the tree and return its root. Inverting means every node swaps its left child and right child. For example, LeetCode gives this input and output: root = [4,2,7,1,3,6,9] becomes [4,7,2,9,6,3,1] . The constraints say the tree has between 0 and 100 nodes, and each node value is between -100 and 100 . Input and Output...