Skip to content

Glossary: Coding Interviews in Java

Queue

Also written: FIFO, poll

A first-in, first-out collection: you add at the back and `poll` from the front. BFS uses one so the oldest cell is explored first.

Where the book teaches it

Related terms

ArrayDequeBFS (breadth-first search)Stack