TikTok Interview Question

coding: reverse a linked list