Create your own polished presentation in minutes. Just describe what you need.
Free to try, no credit card requiredQueue (Data structure )
Queue order
what is queue ?
there are two basics order for the queue to perform actions
1- FIFO (First in , First Out)
2- Priority queue
Building a Queue Step-by-Step
FIFO
queue is a Storage for information where the actions are performed in order Except priority actions, which insertion is
done at one end (Front), while deletion is
performed at the other end (Rear)
Enqueue
First step enqueue first element
Same goes for the rest
Queue Operations
1-The front index is always fixed
2-The rear index moves forward in the array.
First in first out queue order is simply that the first element in the list is the first to go to execution ( which it mean first out )
There are several different algorithms to
implement Enqueue and Dequeue
dequeueing
Dequeue
Enqueue
delete the element at the front of
the list.
Priority queue
insert an element at the rear (End) of the list.
1-The element at the front of the
queue is removed
2-Move all the elements after
it by one position
Priority queue which is less used than FIFO, it allow the elements that have priority to execute first , and this is done by the cpu its responsible in sorting priority of which important to go first
Queue
Create your own polished presentation in minutes. Just describe what you need.
Free to try, no credit card required