Wiz Freight Interview Question

write a code binary tree