Infosys Interview Question

reverse the link list garbage collector