LTIMindtree Interview Question

Reversing a string and linked list