PTC interview question

questions involved writing a function to reverse a linked list