in DS retagged by
1,171 views
1 vote
1 vote

A queue is implemented using an array such that ENQUEUE and DEQUEUE operations are performed efficiently. Which one of the following statements is CORRECT($n$ refers to the number of items in the queue)?

  1. Both operations can be performed in $O(1)$ time.
  2. At most one operation can be performed in $O(1)$ time but the worst case time for the other operation will be $\Omega(n)$.
  3. The worst case time complexity for both operations will be $\Omega(n)$.
  4. Worst case time complexity for both operations will be $\Omega(\log n)$.
in DS retagged by
by
1.2k views

1 comment

0
0

3 Answers

1 vote
1 vote

i think A is the answer

1 vote
1 vote
a is answer both takes O(1)
1 vote
1 vote
Answer:

Related questions