Course contentsShow
Java
Lesson 1187 of 2,87027. Queue and Deque ImplementationsPro lesson

Retrieving the Head: peek and poll

Use peek to inspect the highest-priority element without removal, and poll to retrieve and remove it.

This lesson is for subscribers

You've completed the free preview. Subscribe to unlock every lesson in every course.