NVIDIA interview question

reverse a linked list in python