MapR Technologies interview question

Determining if a tree is a valid binary tree