
Queue

Quiz
•
Computers
•
University
•
Hard
Ramlah .mailok
Used 22+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which the following is not true about queue?
An ordered collection of items where the addition of new items happens at one end
The simplest example of a queue is the typical line that we all participate in from time to time.
As an element enters the queue it starts at the rear and makes its way toward the front, waiting until that time when it is the next element to be removed.
An ordered collection of items where the addition of new items and the removal of existing items always takes place at the same end
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Suppose you have the following series of queue operations.
q = Queue();
q.enqueue('hello');
q.enqueue('dog');
q.enqueue(3);
q.dequeue();
What items are left on the queue?
'hello', 'dog'
'dog', 3
'hello', 3
'hello', 'dog', 3
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Suppose you have the following series of queue operations.
q = Queue();
q.enqueue('hello');
q.enqueue('dog');
q.dequeue();
q.enqueue('3');
q.dequeue();
What items are the output?
hellodog
hello
doghello
hellodog3
3
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Suppose you have the following series of queue operations.
q = Queue();
q.enqueue(1);
q.enqueue(10);
q.enqueue(100);
q.dequeue();
q.dequeue();
What items are the output?
10010
101
110
10010
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
If the characters 'D', 'C', 'B', 'A' are placed in a queue (in that order), and then removed one at a time, in what order will they be removed?
ABCD
ABDC
DCAB
DCBA
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
One difference between a queue and a stack is:
Queues require linked lists, but stacks do not.
Stacks require linked lists, but queues do not.
Queues use two ends of the structure; stacks use only one.
Stacks use two ends of the structure, queues use only one.
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Suppose we have a circular array implementation of the queue, with ten items in the queue stored at data[2] through data[11]. The current capacity is 42. Where does the insert method place the new entry in the array?
data[1]
data[2]
data[11]
data[12]
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
C and Java Programming Quiz

Quiz
•
University
10 questions
DSA quiz

Quiz
•
University
10 questions
Queue-awal

Quiz
•
University
10 questions
DAA-UNIT-4 QUIZ

Quiz
•
University
10 questions
Structure Data Review

Quiz
•
University - Professi...
8 questions
DSA Stack & Queue

Quiz
•
University
15 questions
CP - Quiz 01

Quiz
•
University
14 questions
Quiz tentang Struktur Data Queue

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University