Microsoft interview question

A question was asked on binary tree of medium difficulty.