Results 1 to 2 of 2
how to reverse a linked list ?...
- 09-29-2010 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 3
reverse a linked list
how to reverse a linked list ?
- 09-29-2010 #2
There are a number of ways; use stl, and have your linked list in a vector then use pop_back() to pull the end entries out and stuff them into some container the other way round.
Or you could just use a doubly-linked list to start with then you just traverse it backwards.
Or you could just type it backwards 'tsil deknil a'... perhaps that's what you want?
This wouldn't be a homework question, would it? Because you know that they're not allowed.Linux user #126863 - see http://linuxcounter.net/


Reply With Quote