| Author |
Reversing a singly linked list
|
Wilson Gordon
Ranch Hand
Joined: Apr 07, 2007
Posts: 89
|
|
I am looking for some ideas on how to reverse a singly linked list efficiently. Thanks in advance.
|
 |
Garrett Rowe
Ranch Hand
Joined: Jan 17, 2006
Posts: 1295
|
|
I'm not sure how your linked list is represented internally, but maybe something like this will work: Does that help at all? [ June 29, 2007: Message edited by: Garrett Rowe ]
|
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
|
 |
Wilson Gordon
Ranch Hand
Joined: Apr 07, 2007
Posts: 89
|
|
|
Thanks Garrett. That looks like a good algorithm!
|
 |
 |
|
|
subject: Reversing a singly linked list
|
|
|