Facebook | Phone Screen | Validate Single Binary Tree
Anonymous User
1230

You have standard node of node.left node.right and val.

Given a list of nodes(which can be graph, circular, multiple trees) verify if it is a single binary tree. Vals can be duplicate
1
23

Input = [1,2,3]
Output = True

1
23 4
Input = [1,2,3,4]
Output = False

Comments (2)