Question: 3 : Given an CircularArrayQueue class implementing a queue using an array: class CircularArrayQueue { private: int array [ 1 0 ] ; / /
: Given an CircularArrayQueue class implementing a queue using an array:
class CircularArrayQueue
private: int array; size is
int front; index of item to dequeue
int back; index of item to enqueue
public: CircularArrayQueue : array front back
void enqueueint i;
int dequeue;
;
Match the blanks with the corresponding code for void enqueueint i and int dequeue:
void CircularArrayQueue::enqueueint i
ifA
B;
arraybacki;
int CircularArrayQueue::dequeue
int val ;
ifC
val arrayfront;
D;
return val;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
