Sollicitatievraag bij Marvell Technology

reverse linked list

Antwoord op sollicitatievraag

Anoniem

5 jun 2019

Using iterative method: struct Node* head; void reverseList(){ struct Node *curr, *next, *prev; current = head; while(currently != NULL){ next = curr->next; curr->next = prev; prev = curr; curr = next; } head = prev; }

1