Contrast with sequential search.

In particular, there is no early exit from finding the largest algorithm.

How is this algorithm an example of divide and conquer?

**Answer**: Find
largest in *A*_{1},
*A*_{2}, ..., *A _{i}*,

**QUESTION:** In the previous two algorithms what would happen if, in the telephone book algorithm there were more than two persons with the same name, or in the find largest there were two locations with the same largest value?

How would you modify these algorithms to provide a better solution?

In these two cases do the algorithms fail the five-part test because they are incomplete solutions?

CS1104
Main Page

Last Updated 01/05/2000

©
L.Heath, 2000