int ijktempkeytempdatastruct node *currentstruct node *nextint size length() size for size ++ -current headnext head->nextfor +if current->data next->data tempdata current->datacurrent->data next->datanext->data tempdatatempkey current->keycurrent->key next->keynext->key tempkeycurrent current->nextnext next->nextvoid reverse(struct node*head_refstruct nodeprev nullstruct nodecurrent *head_refstruct nodenextwhile (current !nullnext current->nextcurrent->next prevprev currentcurrent next