Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@vishal-pysGmK • Apr 14, 2016
The first thought that comes to my mind is, If 2 stacks are used, it is pretty straight forward. Push the elements to one stack and run your top pointer to pop the elements and push them to the 2nd stack, 2nd stack is your queue.
Let me know if I understand this wrong. -
@pratap-singh-6xlmve • Apr 14, 2016
yes....you are right.Vishal0203The first thought that comes to my mind is, If 2 stacks are used, it is pretty straight forward. Push the elements to one stack and run your top pointer to pop the elements and push them to the 2nd stack, 2nd stack is your queue.
Let me know if I understand this wrong.