Samsung Electronics Interview Question

write a program to reverse a link list.