A binary tree is considered an Even Odd tree if it satisfies the following conditions:
The root of the binary tree is at level index
For every even indexed level, all nodes at that level have odd integer values in strictly increasing order from left to right.
For every odd indexed level, all nodes at that level have even integer values in strictly decreasing order from left to right.
Given the root of a binary tree, return true if the binary tree is an Even Odd tree, or false otherwise.
Constraints:
The number of nodes in the tree is in the range
Node.val
A binary tree is considered an Even Odd tree if it satisfies the following conditions:
The root of the binary tree is at level index
For every even indexed level, all nodes at that level have odd integer values in strictly increasing order from left to right.
For every odd indexed level, all nodes at that level have even integer values in strictly decreasing order from left to right.
Given the root of a binary tree, return true if the binary tree is an Even Odd tree, or false otherwise.
Constraints:
The number of nodes in the tree is in the range
Node.val