Amazon interview question

It was a binary tree related question