Skip to content

Glossary: Coding Interviews in JavaScript

Queue

Also written: queues

A first-in, first-out list in which items leave in the order they arrived. In JavaScript an array can work as one, using `push` to add at the back and `shift` to remove from the front, and breadth-first search (BFS) relies on it.

Where the book teaches it

Related terms

BFS (breadth-first search)StackMessage queue