Keysight Technologies Interview Question

Write a code to reverse a linked list.