UKG interview question

Reverse a linked list leetcode question