Pergunta de entrevista da empresa Zscaler

Given a singly linked list, convert it into a tree like structure.