Zscaler Interview Question

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