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()

  1. A.

    6, 8, 5, 2

  2. B.

    5, 2, 6, 8

  3. C.

    5, 2, 8, 6

  4. D.

    2, 5, 8, 6

Attempted by 441 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…