Pergunta de entrevista da empresa Code Vyasa

Tree and linked list coding question