Pregunta de entrevista de Code Vyasa

Tree and linked list coding question