What I want to do is to reverse the list i.e. make thelast element first and the first element last.

If you have a single linked list this requires a restructuring. You can for example first traverse the list and store each node in an array, then read the array in reversed order and at the same time build the list anew.

If you have a single linked list this requires arestructuring. You can for example first traverse thelist and store each node in an array, then read thearray in reversed order and at the same time build thelist anew.

I don't want anyother methods folks I just want to understand someone elses code that I just posted,maybe if anyone can comment each line of the code and specify what it is doing i'll appreciate it! if you need whole code please let me know

I don't want anyother methods folks I just want tounderstand someone elses code that I just posted,maybe if anyone can comment each line of the code andspecify what it is doing i'll appreciate it!if you need whole code please let me know

thanks

Do you know Catch 22?

There's a nice little quote in there "You are a very strange person, Yossarian".