Computer Science: An Overview: Global Edition (12th Edition)

Published by Pearson Higher Education
ISBN 10: 1292061162
ISBN 13: 978-1-29206-116-0

Chapter 8 - Data Abstractions - Section 8.1 - Basic Data Structures - Questions & Exercises - Page 377: 4

Answer

The letters in the queue from head to tail would be B, C, D, and E. If a letter were removed from the queue, it would be the letter B.

Work Step by Step

The letter A is placed in an empty queue, followed by the letters B and C, in that order. Then suppose that a letter is removed from the queue and the letters D and E are inserted. Listing the letters that would be in the queue in the order they would appear from head to tail. If a letter is now removed from the queue, which letter will it be The letters in the queue from head to tail would be B, C, D, and E. If a letter were removed from the queue, it would be the letter B
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.