Pergunta de entrevista da empresa Tata Consultancy Services

Reverse a linked list. Create a tree.