MonaMobeen / FIFORule

Queue DSA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FIFORule

Basic Operations of Queue A queue is an object (an abstract data structure - ADT) that allows the following operations:

Enqueue: Add an element to the end of the queue Dequeue: Remove an element from the front of the queue IsEmpty: Check if the queue is empty IsFull: Check if the queue is full Peek: Get the value of the front of the queue without removing it

download

Enqueue Operation check if the queue is full for the first element, set the value of FRONT to 0 increase the REAR index by 1 add the new element inthe position pointed to by REAR!

download

Dequeue Operation check if the queue is empty return the value pointed by FRONT increase the FRONT index by 1 for the last element, reset the values of FRONT and REAR to -1

download

About

Queue DSA


Languages

Language:C++ 100.0%