Given the root of a binary tree, return the sum of the values of all nodes that have an even-valued grandparent. If no such nodes exist, return
Note: A grandparent of a node is defined as the parent of its parent.
Constraints:
The number of nodes in the tree is in the range
Node.val
Given the root of a binary tree, return the sum of the values of all nodes that have an even-valued grandparent. If no such nodes exist, return
Note: A grandparent of a node is defined as the parent of its parent.
Constraints:
The number of nodes in the tree is in the range
Node.val