Synopsys Interview Question

He asked to write a pseudocode for reversing a linked list.