A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. 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)?
a. Both operations can be performed in O(1) time
b. At most one operation can be performed in O(1) time but the worst case time for the other operation will be Ω(n)
c. The worst case time complexity for both operations will be Ω(n)
d. Worst case time complexity for both operations will be Ω(log n)
Answer:Both operations can be performed in O(1) time
Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here

Similar Questions: