Wish interview question

Algorithm problem about binary trees