Sopra Steria interview question

it was from binary tree.