Question
In Java, which interface defines the basic operations
for a queue, and which class is a common concrete implementation that supports these operations with efficient O(1) time complexity for offer and poll?Solution
In Java, java.util.Queue is the interface that defines queue operations. java.util.LinkedList is a common concrete class that implements the Queue interface and provides O(1) time complexity for offer() (enqueue) and poll() (dequeue) operations when used as a queue.

What is the name of the protein digesting enzyme released by the gastric glands?
Shadows are formed when a/an _______ object comes in the path of light.
A body of mass 6 kg accelerates from 6 m/s to 18 m/s in 3 seconds due to the application of a force on it. Calculate the magnitude of this force (in N).
Which gas is most abundant in the Earthβs atmosphere?
The ozone hole that has been detected lies in the atmosphere above β
Which element has the highest electron affinity?
What is the boiling point of water in Celsius?
What is the primary cause of tides on Earth?
Which of the following phenomenon is responsible for the movement of water in plants?