TikTok interview question

Leet code question: Reverse K linked List