considering the stack : 1,0,2,4,5,7 with top = 7
queue 1 : 3,6,7,8,9,0 with front as 3 and rear as 0.
now as we know that :-> stack : lifo queue : fifo
1st case : x=7 , y = 3 ==> x=x+y =10
so now queue1=6,7,8,9,0,10 ans queue 2 = 3,
similarly we will execute the while loop since stack is empty.
which gives out..
queue 1 : 10,11,11,10,9,1
queue 2 : 3,6,7,8,9,0
so answer is A