@ VIDYADHAR SHELKE 1 Consider that the stack initially contains the elements 1,2,3,4 from bottom to top (i.e 4 is at the top)
Consider 2 operations to be performed
1) Dequeue
2) Enqueue(5)
For 1)
We'll have to first reverse the stack. So stack contents 4,3,2,1 from bottom to top.
Next,we'll pop the element. So stack contents 4,3,2.
Now we'll have to reverse the elements,since we want to enqueue in 1 operation(if we dont reverse then 5 will be pushed after 2,but it should be pushed after 4). So stack contents 2,3,4.
Now Enqueue(5) . So stack contents 2,3,4,5 from bottom to top.
Hence, total Dequeue operations =3 and Enqueue operations = 1.