Queue Operations Quiz

Queue Operations Quiz

9th Grade

10 Qs

quiz-placeholder

Similar activities

HTML

HTML

KG - 9th Grade

11 Qs

LIST IN PYTHON

LIST IN PYTHON

8th - 10th Grade

15 Qs

eCommerce ReCap

eCommerce ReCap

8th Grade - University

10 Qs

Serif Draw Plus

Serif Draw Plus

4th - 9th Grade

15 Qs

Python List

Python List

4th Grade - University

15 Qs

Adobe Animation

Adobe Animation

9th Grade

15 Qs

Gebruikersondersteuning, h 12-14, Brinkman Uitgeverij

Gebruikersondersteuning, h 12-14, Brinkman Uitgeverij

KG - University

12 Qs

HTML Lesson 5

HTML Lesson 5

7th - 10th Grade

14 Qs

Queue Operations Quiz

Queue Operations Quiz

Assessment

Quiz

Computers

9th Grade

Hard

Created by

Donna Callender

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a dequeue operation?

Removes and returns the element from the front of the queue

Removes and returns the element from the rear of the queue.

Removes the element from the front of the queue.

Returns the element from the rear of the queue.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A queue is implemented in Python using the built-in list data structure. What Python method is used to implement enqueue() function?

insert()

append()

add()

delete()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If maxsize is equal to size of the array used in a circular queue (q), complete the pseudocode given for enqueue operation. function enQueue(element){ if q.isFull() print(‘Queue is full’) else rear=...................... q[rear]=newElement}

rear+1

(rear+1) MOD maxsize

(rear-1) MOD maxsize

(front-1) MOD maxsize

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What element does the rear pointer point to?

‘a’

‘b’

‘c’

‘d’

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of q? (Based on the following operations performed on a circular queue implemented using an array: q=Queue(4), q.enQueue(10), q.enQueue(20), q.enQueue(30), q.enQueue(40), q.deQueue(), q.enQueue(50))

[10, 20, 30, 40]

[10, 20, 30, 50]

[50, 10, 20, 30]

[50, 20, 30, 40]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is q.rear? (Based on the following operations performed on a circular queue implemented using an array: q=Queue(4), q.enQueue(10), q.enQueue(20), q.enQueue(30), q.enQueue(40), q.deQueue(), q.enQueue(50))

0

1

2

3

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If max size is equal to size of the array used in a circular queue (q), complete the pseudocode given for dequeue operation. function deQueue(){ if q.isEmpty(){ print(‘Queue is empty’) element=null} else{ .................................. .................................. } return element }

element=q[front] front=(front+1) MOD maxsize

element=q[rear] rear=(rear-1) MOD maxsize

element=q[front] front=(front-1) MOD maxsize

element=q[front+1] front=(front+1) MOD maxsize

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?