...
Digital-Logic-Design
October 16, 2023
Digital-Logic-Design
October 16, 2023
Digital-Logic-Design
October 16, 2023
Digital-Logic-Design
October 16, 2023

Nielit Scientist-B CS 22-07-2017

Question 10
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
Question 10 Explanation: 
Since it is mentioned in the question that both of the operations are performed efficiently. Hence even the worst case time complexity will be O(1) by the use of the Circular queue there won’t be any need of shifting in the array.
Correct Answer: A
Question 10 Explanation: 
Since it is mentioned in the question that both of the operations are performed efficiently. Hence even the worst case time complexity will be O(1) by the use of the Circular queue there won’t be any need of shifting in the array.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!