If the following operations are performed on a Queue, what will be the…
UP Police Computer Operator Grade A · Computer Science · 2016
If the following operations are performed on a Queue, what will be the sequence in which the elements are removed?
push(2), push(5), pop(), pop(), push(8), push(6), pop(), pop()
- A.
6, 8, 5, 2
- B.
5, 2, 6, 8
- C.
5, 2, 8, 6
- D.
2, 5, 8, 6
Attempted by 441 students.
Sign up free to check your answer
Sign up freeLoading lesson…