• Post Reply Bookmark Topic Watch Topic
  • New Topic

Sorting? Ordered stack?  RSS feed

 
CP Lau
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this a class assignment? Otherwise why would you re-invent the wheel???
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!