Q – Queue
X – element to added to the queue Q IsFull(Q)
– Checks and true if Queue Q is full Q->Size – Number of elements in the queue Q Q->Rear – Points to last element of the queue Q Q->Array – array used to store queue elements void
enqueue (int X, Queue Q) {
if(IsFull(Q))
Error (“Full queue”);
else {
Q->Size++;
Q->Rear = Q->Rear+1;
Q->Array[ Q->Rear ]=X;
}
}
Discover more from Soa Technology | Aditya Website Development Designing Company
Subscribe to get the latest posts sent to your email.