First Student interview question

Reverse a linked list to write a code