Domanda di colloquio di Amazon

How to reverse a linkedList?

Risposta di colloquio

Anonimo

19 feb 2015

I believe a stack data structure would work well for this. Traverse the list and push each node onto the stack. Then pop each off making the list.