Pregunta de entrevista de Microsoft

given a binary tree, validate that it is well formed