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)?
- ABoth operations can be performed in O(1) time
- BAt most one operation can be performed in O(1) time but the worst case time for the other operation will be \(\Omega\)(n)
- CThe worst case time complexity for both operations will be \(\Omega\)(n)
- DWorst case time complexity for both operations will be \(\Omega\)(logn)