Use code tags to post relevant code with error messages. The error messages should be in order of presentation by the compiler, as frequently if you fix the first error message the others go away as well.
Example : If the stack initially such as Top_node -> 5 , 7, 8, 12, 15, 25, 32
After insertion( 20 ) it will be Top_node -> 5 , 7, 8, 12, 15, 20, 25, 32
Well the logic you need is simple:
Use two stacks - one already sorted and one that is empty (called temp).
Then when you get a new element, keep on popoing element from the sorted one and push them to the other temp one as long as the new element is larger.
Once you find the correct place for the new element, push it to the sorted stack, then pop the elemnts from the other temp stack and push into the sorted one. :D
Well you got to put all this into code ofcource :cool:
Why dont you post what you have alredy written so that others can have a look :idea:
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...