Chapter 16 - Search Algorithms Flashcards
1
Q
What is a collection?
A
any data structure that stores one or more items — this includes lists, dictionaries, and arrays.
2
Q
What is a search key?
A
In a collection, every data item is identified by a search key.
3
Q
What is a target key?
A
We search a collection by choosing a target key and then look for the item in the collection whose search key matches the target key.
4
Q
What is the difference between a membership search and a retrieval (look-up) search?
A