TikTok interview question

coding: reverse a linked list