Suppose you are implementing the address book feature for a cellphone. The address book needs to be kept sorted by person’s last name and support fast access when queried by last name. Which of the following data structures would be a good choice to use for storing the address book? Justify your answer for both of the following data structures?

Respuesta :

Answer:

Sorted linked list

Explanation:

  • A sorted linked list can be used for sorting the last name and support fast access while queried by the last name.
  • The hash table cannot be used because it could have a problem if there would be more buckets to handle than the expected.
  • The binary search table is implemented as the hash table hence both will give the same results.