Amazon Interview Question

How to reverse a linkedList?

Interview Answer

Anonymous

Feb 19, 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.