S&P Global interview question

Leetcode - reverse a linked list