26. Symmetric Tree
EasyTrees
Return true if a binary tree is a mirror image of itself around its centre.
A binary tree is passed as TreeNode objects with val, left and right. The tests write trees in level order, with null for a missing child.
Example 1
Input: root = [1, 2, 2, 3, 4, 4, 3] Output: true
Example 2
Input: root = [1, 2, 2, null, 3, null, 3] Output: false
Constraints
0 ≤ nodes ≤ 1000