File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Sorting? Ordered stack? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Sorting? Ordered stack? " Watch "Sorting? Ordered stack? " New topic

Sorting? Ordered stack?

CP Lau

Joined: Apr 05, 2001
Posts: 3
Looking to sort using an ordered stack and the java.util.Stack class but I'm not certain how to code it with push and pop. Pushing into the first stack then popping it out when new input is added inorder to sort it. The pop would send it to a temp stack or send what has to be sent to the temp stack then push and pop it back into the original stack. I'm really lost and sure my explination is just going to confuse others.
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Is this a class assignment? Otherwise why would you re-invent the wheel???

"JavaRanch, where the deer and the Certified play" - David O'Meara
I agree. Here's the link:
subject: Sorting? Ordered stack?
It's not a secret anymore!