We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
So ... I don't get it. The problem is set up so I can just fill in content for the three methods, but nothing about the code template requires that I actually implement this in terms of stack primitives -- I can just implement the pop operation as "first = first without the 0-element". It would make more sense if this exposed some Stack class that I had to use when implementing this.
Queues: A Tale of Two Stacks
You are viewing a single comment's thread. Return to all comments →
So ... I don't get it. The problem is set up so I can just fill in content for the three methods, but nothing about the code template requires that I actually implement this in terms of stack primitives -- I can just implement the pop operation as "first = first without the 0-element". It would make more sense if this exposed some Stack class that I had to use when implementing this.