SpanIdea interview question

How to reverse linked list?