Pergunta de entrevista da empresa AMD

Reverse a list

Respostas da entrevista

Sigiloso

19 de nov. de 2014

Pretty simple

Sigiloso

20 de nov. de 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