Stack using queue push efficient
Java DS
crx-stack-using-queue-push-efficientcode
Abhishek-Verma-1947662505352705
(Abhishek Verma)
March 22, 2019, 3:58pm
#1
in pop and top can,t we use:
reverseQueue(primary);
2.dequeue() or front();
3.reverseQueue(primary);
here is no use of secondary queue
Rishab-Kapoor-1417799338262878
(Rishab Kapoor)
March 18, 2019, 1:31pm
#2
you can also do it that way.Both ways are correct.