An implementation of a queue Q, using two stacks S1and S2, is given below:
The number Push and Pop operation needed is represented by X and Y, then the value of X + Y for following operation are ________.
Add this :
17 ..
syncronizing Thank you :p I did not make it make it an answer because it was looking dull(the pic quality) hehe :p
Now Simply add total PUSH and POP operation. PUSH = 9 POP = 8 hence, 17 is the answer. Answer by @MiNiPanda
64.3k questions
77.9k answers
244k comments
80.0k users