Which of the following operations on a queue data structure has a time…

2025

Which of the following operations on a queue data structure has a time complexity of O(1) ?

(a) Enqueue (b) Dequeue (c) Peek (d) Clear

Answer: D. a, b and c

  1. A.

    a and b

  2. B.

    b only

  3. C.

    c only

  4. D.

    a, b and c

Attempted by 490 students.

Show answer & explanation

Correct answer: D

Explore the full course: Tpsc Assistant Technical Officer

Loading lesson…