Answers/Solutions to Exercises in Chapter 9, Exercise 1

E1: Why cannot linked data structures be copied to a disk and later on read from the disk and reinstalled? For instance, take a
search tree, and write each node to a disk. Then just read it back, and store it in the memory. Don't we get the same tree?

A1: Unfortunately, this is not possible, as we cannot guarantee creation of the tree at the same "location". Moreover, the links are addresses, and if preserved in their run-time form, they become meaningless, unless we place all the nodes of the structure in exactly the same mutual relative positions as they originally had, which is not possible.

Back to Answers/Solutions Index                          Back to Answers/Solutions for Chapter 9 Index