Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sort Doubly Linked List using ONLY a stack

807600Jun 7 2007 — edited Jun 7 2007
Hello everyone,

How would you go about sorting a double linked list using only a stack? No other variables are allowed.

I understand I have to use the stack as storage and that I could insert the Nodes into the stack in order and then pop them out. But I'm having trouble understanding how to traverse through the double link list without using variables. Thanks for the help, it is much appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 5 2007
Added on Jun 7 2007
11 comments
212 views