Symmetric Binary Tree

00:00
EasyTreeDFSBFSRecursion
AmazonMicrosoft

Check if a binary tree is symmetric (mirror image of itself around its center).

Examples

Input → [1,2,2,3,4,4,3]
Output → True
Input → [1,2,2,null,3,null,3]
Output → False
Input → [1]
Output → True