Domanda di colloquio di Microsoft

given a binary tree, validate that it is well formed