Funzioni Fondamenti Informatica (S. Cavalieri): DeQueue

Page 1

ELIMINAZIONE CODA void DeQueue(queue *q){ struct nodoQueue *temp; if(!EmptyQueue (*q)){ temp = q->front->next; free(q->front); q->front = temp; if(q->front == CODAVUOTA) q->rear = CODAVUOTA; } }

ELIMINAZIONE CODA ULTIMO ELEMENTO HH00

q NULL rear front

ELIMINAZIONE CODA GENERICA IN POSIZIONE FRONT CD00

FF00

AB00

q CD00

AB00

HH00

temp front

front

rear

temp rear front


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.