Queue

Data Structures and …

Definition

Think of a queue as a line of people waiting to buy a ticket for an event (music concert, film, etc.).

Photo Credit: Bryan Bedder/Getty Images for Tribeca Film Festival

In the queue shown at the picture, a person who just arrives to buy a ticket goes to the left side (unless cheating) and a …