5.13 - Linked Queues

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

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?

DCBA

It is an error to dequeue data from a(n) _______ queue.

Empty

One difference between a queue and a stack is:

Queues use two ends of the structure; stacks use only one

The following sequence of operations is performed on a queue: enqueue(1), enqueue(2), dequeue, enqueue(1), enqueue(2), dequeue, dequeue, dequeue, enqueue(2), dequeue. The values will be output in this order:

1, 2, 1, 2, 2

The following sequence of operations is performed on a stack: push(1), push(2), pop, push(1), push(2), pop, pop, pop, push(2), pop. The values will be output in this order:

2, 2, 1, 1, 2

If the characters 'D', 'C', 'B', 'A' are placed in a stack (in that order), and then removed one at a time, in what order will they be removed?

ABCD

Queue behavior is typically referred to as:

First-In, First-Out

It is an error to push data onto a(n) _______ stack.

Full

In the linked implementation of a queue, a new item would be added to the:

Rear

Which value of a queue is accessible?

The front item

Which value of a stack is accessible?

The top item


Ensembles d'études connexes

Section : 3 Completing job application

View Set

Fundamentals Passpoint flash cards

View Set

Organizational culture and ethical behavior

View Set

HIT II Chapter 41 (MS Disorders)

View Set

English test a raisin in the sun.

View Set

unit 2 biological bases of behavior

View Set

major features of coronary circulation

View Set