What is the time complexity of enqueue operation?
A. O(logn)
B. O(nlogn)
C. O(n)
D. O(1)
Answer:D
What is the time complexity of enqueue operation?
A. O(logn) B. O(nlogn) C. O(n) D. O(1)
Explanation: The enqueue process is performed at the back end, and adding a new item to the queue takes O(1) time.