12 elements are enqueued into the queue 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 , 11,…
12 elements are enqueued into the queue 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 , 11, 12. Then 3 elements from it are dequeued & pushed into the stack. Then 2 element is popped & enqueued back to queue. This process of 3 dequeue & 3 pushes & 2 pop & 2 enqueue in this respective sequence is called as OP1. If we execute OP1, 4 times on the given queue & stack, then the element at the top of stack is ?
- A.
12
- B.
2
- C.
3
- D.
10
Attempted by 127 students.
Sign up free to check your answer
Sign up freeLoading lesson…