Linked list quiz

can you plz explain q-9 in linkedlist quiz

can you please paste the question here??

because you have asked your doubt on question β€œll-k-reverse” so i can see the quiz

Predict the modified doubly linked list of the following code for the given doubly linked list as 1<–> 2 <–> 3 <–> 4 <–> 5 <–>6
CPP

void fun(node **head_ref)
{
    node *temp = NULL;
    node *current = *head_ref;

    while (current !=  NULL)
    {
        temp = current->prev;
        current->prev = current->next;
        current->next = temp;
        current = current->prev;
    }

    if(temp != NULL )
        *head_ref = temp->prev;
}

which thing is not clear??

it is simple code if you dry run it
you will get it is reversing the linked list

so ans should be
6 <–> 5 <–> 4 <–> 3 <–> 2 <–> 1