Problem
Given theroot of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center).
Examples
Constraints
- The number of nodes in the tree is in the range [1, 1000].
- -100 <= Node.val <= 100
Tested Python solution for LeetCode 101 with 16 pytest cases. Generate a practice environment with lcpy.
root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center).