Answers for "dequeue function in queue in c"

0

dequeue function in queue in c

int dequeue(struct Queue* queue)
{
    if (isEmpty(queue))
        return INT_MIN;
    int item = queue->array[queue->front];
    queue->front = (queue->front + 1)
                   % queue->capacity;
    queue->size = queue->size - 1;
    return item;
}
Posted by: Guest on June-21-2021

Browse Popular Code Answers by Language