Quiz 6 (ch 7 & 8)

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

In a circular array-based implementation of a queue, the available locations are not contiguous. True False

False

In a linked chain implementation of a queue, the enqueue operation could potentially be dependent on the other entries and will require a search. True False

False

In a linked chain implementation of a queue, the enqueue operation requires a traversal to the end of the chain to insert a new entry onto the queue. True False

False

The ArrayDeque class implements the Stack Interface True False

False

Unlike a stack, a queue does not restrict access to its entries True False

False

In a linked chain implementation of a queue, the performance of the enqueue operation is O(log n) O(n2) O(1) O(n)

O(1)

A priority queue cannot have null entries True False

True

In a circular array-based implementation of a queue, frontIndex is equal to one more than backIndex when the queue is empty. True False

True

In a linked chain implementation of a queue, when both the firstNode and lastNode entries are null, the chain is empty. True False

True

In an array-based implementation of a queue, inserting and deleting entries is accomplished using modulo arithmetic. True False

True

Queues are used in operating systems True False

True

The program stack stores activation records chronologically. True False

True

You can push, pop, and get items at either end of the ADT deque True False

True

Which of the following real-world events could be simulated using a queue? bank line a shared network printer restaurant reservation list all of the above

all of the above

What type of behavior defines a queue? first-in first-out first-in last-out last-in first-out none of the above

first-in first-out

In an array-based implementation of a queue, a possible solution to dealing with the full condition is to maintain a count of queue items check for frontIndex equal to backIndex wait for an arrayFullException to be thrown all of the above

maintain a count of queue items

In a linked chain implementation of a queue, an external reference to the last node in the chain is called a(n) tail reference linked reference final node last node

tail reference

In the linked chain implementation of a queue, the chain's first node contains the queue's front entry the queue's back entry both a & b none of the above

the queue's front entry

If we use a chain of linked nodes with only a head reference to implement a queue which statement is true? You must traverse the entire chain to access the last node. Accessing the last node is very inefficient. Both a & b None of the above

Both a & b

In a linked chain implementation of a queue, when the queue is empty the firstNode is null the lastNode is null both a & b none of the above

both a & b


Kaugnay na mga set ng pag-aaral

★ Peds HESI Practice Questions ★

View Set

Evaluating Expressions with Exponents: Assignment

View Set

Skin Cancer Med Surg Success & Test Bank

View Set

History Chapter 20-23 Study Guide

View Set

Evolve Pediatric/maternatiy quiz 3

View Set

Motivation - cognitive evaluation theory

View Set