Is this correct for reversing a linkedlist?

I tried looking up how to define a linked list. can you hint me ?

I was hoping it would be a simple variable definition