How is Sequential
Search like Divide and Conquer?
How is Sequential Search like Divide and Conquer?
Each time through the body of the repeat loop, the problem of finding Name in the list Ni, Ni+1, ..., N10,000 is divided into subproblems:
1. Finding NAME in the one-element list Ni; and
2. Finding NAME in the list Ni+1, ..., N10,000.
We have, in essence,
peeled off a very small subproblem in each iteration of the loop.
Last Updated 2001/10/04
© L.Heath, 2000, and extensively modified by J.A.N. Lee, 2001.