Praava Health interview question

They asked me to implement a function to reverse a linked list. I explained my approach step-by-step, wrote the code in the given time, and discussed its time and space complexity.