What is the time complexity of offer() and poll() operations in a LinkedList-based queue?

Last Updated :
Discuss
Comments

What is the time complexity of offer() and poll() operations in a LinkedList-based queue?

O(n)

O(log n)

O(n log n)

O(1)

Share your thoughts in the comments