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
- A.
a and b
- B.
b only
- C.
c only
- D.
a, b and c
Attempted by 490 students.
Show answer & explanation
Correct answer: D
Loading lesson…