MCPcopy Create free account
hub / github.com/anupam-kumar-krishnan/Competitive_Programming / dequeue

Function dequeue

Basic Programming/queue.c:58–67  ·  view source on GitHub ↗

Function to remove an item from queue. It changes front and size

Source from the content-addressed store, hash-verified

56// Function to remove an item from queue.
57// It changes front and size
58int dequeue(struct Queue* queue)
59{
60 if (isEmpty(queue))
61 return INT_MIN;
62 int item = queue->array[queue->front];
63 queue->front = (queue->front + 1)
64 % queue->capacity;
65 queue->size = queue->size - 1;
66 return item;
67}
68
69// Function to get front of queue
70int front(struct Queue* queue)

Callers 3

TreecreateFunction · 0.85
LevelOrderFunction · 0.85
mainFunction · 0.85

Calls 1

isEmptyFunction · 0.70

Tested by

no test coverage detected