Sollicitatievraag bij Amazon

Given a binary tree, write an algorithm to validate that it is correct.