
Queue Operations Quiz
Authored by Donna Callender
Computers
9th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Code.org Lesson 1-14
Quiz
•
9th - 12th Grade
12 questions
Sistemul de operare Windows
Quiz
•
5th - 12th Grade
15 questions
Touch Typing Quiz 1
Quiz
•
9th - 12th Grade
15 questions
HTML
Quiz
•
9th - 12th Grade
10 questions
OOP
Quiz
•
9th - 12th Grade
14 questions
Logičke izjave i funkcije
Quiz
•
8th - 10th Grade
10 questions
แบบทดสอบก่อนเรียนหน่วยที่ 4 ว 23293
Quiz
•
9th Grade
12 questions
Business Law 2.01
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade