Six elements are enqueue into the queue a, b, c, d, e and f. 2 elements from…
Six elements are enqueue into the queue a, b, c, d, e and f. 2 elements from the queue are dequeue & pushed into the stack. Then one element is popped & enqueue back to queue. This process of 2 dequeue, 2 pushes, 1 pop & 1 enqueue is called as p1. If we execute p1, 3 times on the given queue & stack, then the element at the top of stack is?
- A.
b
- B.
c
- C.
d
- D.
e
Attempted by 301 students.
Sign up free to check your answer
Sign up freeLoading lesson…