Exam 5: Queues
Exam 1: Introduction36 Questions
Exam 2: Analysis of Algorithms31 Questions
Exam 3: Introduction to Collections - Stacks49 Questions
Exam 4: Linked Structures - Stacks51 Questions
Exam 5: Queues28 Questions
Exam 6: Lists42 Questions
Exam 7: Iterators32 Questions
Exam 8: Recursion57 Questions
Exam 9: Searching and Sorting54 Questions
Exam 10: Trees47 Questions
Exam 11: Binary Search Trees50 Questions
Exam 12: Heaps and Priority Queues29 Questions
Exam 13: Sets and Maps47 Questions
Exam 14: Multi-Way Search Trees47 Questions
Exam 15: Graphs29 Questions
Exam 16: UML16 Questions
Exam 17: Object-Oriented Design54 Questions
Select questions type
Is it possible for the front and rear references in a circular array implementation to be equal?
Free
(Essay)
4.9/5
(44)
Correct Answer:
Yes, it can happen under two circumstances: when the queue is empty, and when the queue is full.
To add an element to a queue you use the____________________ method.
Free
(Multiple Choice)
4.8/5
(45)
Correct Answer:
B
Which implementation has the worst space complexity?
Free
(Essay)
4.9/5
(34)
Correct Answer:
Both of the array implementations waste space for unfilled elements in the array. The linked implementation uses more space per element stored.
Because queue operations modify both ends of the collection, fixing one end at index 0 eliminates the requirement that elements be shifted.
(True/False)
4.8/5
(28)
Treating arrays as circular eliminates the need to shift elements in an array queue implementation.
(True/False)
4.7/5
(27)
The first operation removes an element at the front of the queue and returns a reference to it.
(True/False)
4.8/5
(32)
A linked implementation of a queue is facilitated by references to the ______ and ______ elements of the linked list.
(Multiple Choice)
4.8/5
(43)
Which of the following operations of a queue examines the element at the front of the queue?
(Multiple Choice)
4.8/5
(26)
When an element is removed from a queue using the dequeue operation, that element is removed from the ____________ of the collection.
(Multiple Choice)
4.8/5
(37)
The enqueue and dequeue operations work on opposite ends of the collection.
(True/False)
4.8/5
(27)
When an element is added to a queue using the enqueue operation, that element is added to the ____________ of the collection.
(Multiple Choice)
4.8/5
(30)
A ______ implementation of a queue is the preferable array implementation because it does not require elements to be shifted.
(Short Answer)
4.9/5
(43)
The enqueue and dequeue operations work on ______ ends of the collection.
(Short Answer)
4.8/5
(49)
When one enqueue's an element to a queue, you add that element to the ____ of the queue.
(Short Answer)
4.9/5
(30)
What is the principle difference in behavior between a stack and a queue?
(Multiple Choice)
4.9/5
(35)
The shifting of elements in a noncircular array implementation creates an _______ complexity.
(Multiple Choice)
4.9/5
(38)
When utilizing a circular array for a queue, complete the line of code that updates the value of rear to wrap around the end of the array to the front?
(Essay)
4.8/5
(33)
Showing 1 - 20 of 28
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)