You are given n i, its left child is leftChild[i] and its right child is rightChild[i]. If a node i has no left child, leftChild[i] is rightChild[i] is
Return true if and only if all given nodes form exactly one valid binary tree. Otherwise, return false.
Constraints:
n leftChild.length rightChild.length
n
leftChild[i], rightChild[i] n
You are given n i, its left child is leftChild[i] and its right child is rightChild[i]. If a node i has no left child, leftChild[i] is rightChild[i] is
Return true if and only if all given nodes form exactly one valid binary tree. Otherwise, return false.
Constraints:
n leftChild.length rightChild.length
n
leftChild[i], rightChild[i] n