Hi!

Do we create two Queue classes:?:

Member Avatar for iamthwee

Nope, you create a stack class...with the subsequent attributes...

push()
pop()
isempty()

And you have many options as to how you choose to do this. I.e using linked lists, arrays blah blah blah.

thanks
& what metods do we use in the class that implement the stack with two queues,do we the stack methods(i.e pop()) or dowe use the queue methods(i.e enqueue())

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.