Symmetric N-ary Tree
Given a N-ary tree, check whether it is symmetric around its root. N-ary tree is symmetric if value and shape look the same when reflected at the root.
Note - Nary-Tree input serialization is represented in their level order traversal, each group of children is separated by the null value
Example1
Input: root = [5,null,3,5,3,null,10,null, 15, null, 10]
Output: true
Example2
Input: root = [5,null,3,5,3,null,10,25, null, 15, null, 10]
Output: false
Example3
Input: root = [5,null,3,5,3,null,10, null, 15, null, 25, 10]
Output: false
Example4
Input: root = [5,null,3,5,3,null,10,25, null, 15, null, 35, 10]
Output: false
---
Intuition
Check each level, and check if its symmetric
Symmetric => Node val, and number of children at each end of level order should be the same