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: 7

Answer

See the explanation

Work Step by Step

Given: 11 C 12 13 G 14 15 E 16 17 B 18 19 U 20 21 F 22 Link them in alphabetical order Alphabetical order: B → C → E → F → G → U → (null) Identify the address of each letter Letter Address Pointer Cell B 17 18 C 11 12 E 15 16 F 21 22 G 13 14 U 19 20 Now, we set up the pointers: Letter Address Pointer (next) Next node address B 17 18 11 (C) C 11 12 15 (E) E 15 16 21 (F) F 21 22 13 (G) G 13 14 19 (U) U 19 20 0 (null) Fill in the empty cells: Address Contents 11 C 12 15 13 G 14 19 15 E 16 21 17 B 18 11 19 U 20 0 21 F 22 13 The head pointer should contain the address of the first node in alphabetical order, that is B, which is stored at address 17. Head pointer = 17
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.