I’m at a loss here, what is wrong with this code? what’s wrong with the Stack I’ve implemented ? https://paste.ofcode.org/MmxwVcvXvdBY5EZfZpTPWS
the moment I use Java’s own Stack, the function works fine and returns true for 1st test and false for 2nd
you mean this is a predefined construct that does what I want?
oday
07/08/2021, 9:39 AM
sure but I am trying an exercise that implements this from scratch, that’s why
t
Tom Hermann
07/09/2021, 9:25 PM
Ah that totally makes sense. Here is what I was thinking if you wanted to stick with your interface. It is kind of cheating if the point is to implement a stack from scratch though, lol! Have fun.