/* Before changing next pointer of current node,
store the next node */
next = curr -> next
/* Change next pointer of current node */
/* Actual reversing */
curr -> next = prev
/* Move prev and curr one step ahead */
prev = curr
curr = next