Wiz Freight interview question

write a code binary tree