queue: queue

View source: R/01_constructors.r

queueR Documentation

queue

Description

A queue is a "first in, first out" abstract data type. Like a checkout queue (line) at a store, the first item in the queue is the first one out. New items are added to the end of the queue via pushback(). Items are removed from the queue at the front via pop().

The implementation is a head/tail doubly linked list.

Usage

queue()

Details

A constructor for a queue.

Examples

## Not run: 
library(dequer)
q <- queue()
q

## End(Not run)


dequer documentation built on March 18, 2022, 5:45 p.m.