You are viewing a single comment's thread. Return to all comments →
This is a much cleaner way to solve this problem. It does use an explicit extra Stack, but so does recursion, inherently.
Seems like cookies are disabled on this browser, please enable them to open this website
Reverse a linked list
You are viewing a single comment's thread. Return to all comments →
This is a much cleaner way to solve this problem. It does use an explicit extra Stack, but so does recursion, inherently.