0

hi my name is qurat .. i have a small problem :rolleyes: i dunno how to do this program .. i have tried it several timez but it is giving some or the other error
here it is:

Implement a Queue using two Stacks (implement Stack using link list).
plz if any body can help me out in this question i wud b xtremely grateful
thx
qUrAt;)

5
Contributors
4
Replies
6
Views
11 Years
Discussion Span
Last Post by Prabakar
0

Preety simple.
Enqueue:
Get a data & then push it on to stack 1. squeeze stack1 like a lemon till it dries & collect them in stack 2.
Dequeue:
Squeeze stack2 this time & collect in stack1
pop the data from stack1.
I leave one more important point for you to figure out.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.