Capgemini Engineering interview question

write a code to reverse a link list.