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.
Glossary: Coding Interviews in Java
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.