Question d’entretien chez AMD

Reverse a list

Réponses aux questions d'entretien

Utilisateur anonyme

19 nov. 2014

Pretty simple

Utilisateur anonyme

20 nov. 2016

1) Initialize PREVIOUS to null, CURRENT to head, NEXT to null 2) Start with head, go down the list working one element at a time. a) set NEXT to pointer to next element b) set pointer to next element in CURRENT to PREVIOUS c) set PREVIOUS to CURRENT for next iteration d) set CURRENT to NEXT for next iteration 3) set head to PREVIOUS

1