Binary tree problems from Stanford