Applicate interview question

Based on Linked List and Binary Trees