Qualcomm interview question

write binary tree programm