Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Circular queue

Total questions: 13

Worksheet time: 6mins

Name
Class
Date
1.

Circular Queue is ________ data structure.

a)

linear

b)

non-linear

c)

both linear and non-linear

d)

none

2.

front = rear if and only if queue is full.

a)

True

b)

False

3.

In circular queue, to add an element it will be necessary to move rear one position clockwise.

a)

True

b)

False

4.

in circular queue _______ will always point one position counterclockwise from the first element in queue.

a)

Top

b)

Rear

c)

Front

d)

All positions

5.

In a circular queue, how do you increment the rear end of the queue?

a)

rear++

b)

(rear+1) % SIZE

c)

(rear % SIZE)+1

d)

d) rear–-

6.

What is the time complexity of enqueue operation?

a)

O(logn)

b)

O(nlogn)

c)

O(n)

d)

O(1)

7.

A circular queue is implemented using an array of size 10.

The array index starts with 0, front is 6, and rear is 9. The insertion of next element takes place at the array index.

a)

0

b)

7

c)

9

d)

10

8.

Which is not the type of queue?

a)

Single ended queue

b)

Ordinary queue

c)

Circular queue

d)

Priority queue

9.

In Circular Queue (ARR) of size 3:

enqueue(1)

enqueue(2)

enqueue(3)

dequeue()

enqueue(4)

Index of Element 4?

a)

0

b)

1

c)

2

d)

3

10.

Circular Queue (Arr) of Size 3:

enqueue(1)

enqueue(2)

enqueue(3)

dequeue()

dequeue()

dequeue()

enqueue(4)

Index of element 4 in Arr?

a)

0

b)

1

c)

2

d)

3

11.

Check in Circular Queue is Empty:

int isEmpty() {

if (front == 0){

return 1;

}

return 0;

}

Find the mistake in the above code?

a)

front == -1

b)

No Mistake

c)

front == rear+1

d)

front == rear -1

12.

In a circular queue, how do you increment the rear end of the queue?

a)

(rear++)

b)

(rear+1) % CAPACITY

c)

(rear % CAPACITY)+1

d)

rear--

13.

What is the need for a circular queue?

a)

effective usage of memory

b)

to delete elements based on priority

c)

easier computations

d)

implement LIFO principle in queues