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 :
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