class Graphlb::DataStructures::Queue(A)

Overview

A Queue Data Structure formed using an Array A Queue follows Last-in-First-out

Defined in:

graphlb/data_structures/queue.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

Initializes the Queue with empty


[View source]

Instance Method Detail

def empty? #

returns true if the Queue is empty


[View source]
def pop #

pops the value that is first inserted


[View source]
def push(val) #

pushes the value present inside the val into the Queue


[View source]
def top #

returns the first-most element in the queue


[View source]
def values #

returns all the values that are present in the Queue


[View source]