Infosys interview question

Linked list, stacks, trees DSA question