S&P Global interview question

Reverse a linked list.