Meta interview question

a problem related to binary tree