Amazon interview question

A difficult question about binary trees