A binary tree is named Even-Odd if it meets the following conditions:
0, its children are at level index 1, their children are at level index 2, etc.Given the root of a binary tree, return true if the binary tree is Even-Odd, otherwise return false.
Example 1:
Input: root = [1, 10, 4, 3, null, 7, 9, 12, 8, 6, null, null, 2]
Output: true
Explanation:
Example 2:
Input: root = [5, 4, 2, 3, 3, 7]
Output: false
Explanation: Level 2 has values [3, 3, 7]. The values are not strictly increasing (3 is not less than 3).
Example 3:
Input: root = [5, 9, 1, 3, 5, 7]
Output: false
Explanation: Level 1 has values [9, 1]. They are odd, but odd-indexed levels must have even values.
[1, 10⁵]1 <= Node.val <= 10⁶