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 - Chapter Review Problems - Page 408: 9

Answer

See the explanation

Work Step by Step

The head pointer is 44, so we start at address 44: Address Letter Next Pointer 44 J 45 → 50 50 A 51 → 40 40 N 41 → 46 46 E 47 → 00 (end) So the traversal is: 44 → J 45 → 50 → A 51 → 40 → N 41 → 46 → E 47 → 00 → end Current name: JANE Modify the List to Represent "JEAN" We want the list to spell: J → E → A → N We already have the letters: J at 44 E at 46 A at 50 N at 40 We just need to reorder the pointers. Update Pointers: 44 (J) → next should be 46 (E) → update 45 to 46 46 (E) → next should be 50 (A) → update 47 to 50 50 (A) → next should be 40 (N) → update 51 to 40 40 (N) → next should be 00 (end) → update 41 to 00 Final Memory Table Address Contents Description 40 N Last letter 41 00 End of list 42 I Unused 43 40 Unused 44 J Head 45 46 J → E 46 E 47 50 E → A 48 M Unused 49 42 Unused 50 A 51 40 A → N Final Linked List: J → E → A → N
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.