954,496 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

queue and stack

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;)

qurat
Newbie Poster
1 post since Nov 2006
Reputation Points: 10
Solved Threads: 0
 

Please post the code you wrote -- I left my crystal ball at home this morning. And please read the links in my signature.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

Hi...Its Virtual University assignment...

Farree
Newbie Poster
1 post since Nov 2006
Reputation Points: 10
Solved Threads: 0
 

can any onr tell me to implement queue using stacks

sambasiva
Newbie Poster
1 post since May 2008
Reputation Points: 10
Solved Threads: 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.

Prabakar
Posting Whiz
342 posts since May 2008
Reputation Points: 94
Solved Threads: 33
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You