Binary Search Creates New Sorted List Half Th

DocumentID: 655847
Revision Date: 29-Feb-96 8:29:39 PM

The information in this document applies to:
WordPerfect® 5.1 for DOS

Problem

Solutions: Binary Search: A search technique on a sorted file which creates a new sorted list that is half the length of the original list. This is accomplished as follows: 1. Look at the middle of the list; if the value is equal, the search is finished. If the value is higher, cut the top of the list (i.e., ignore the values higher than the one that was found). 2. Look in the middle of the new list; is it higher or lower? 3. The steps from this point are the same as stated above. The steps are also very similar if the value found was lower. The concept is to cut the list in half each time, creating a new, shorter list. The search looks in the middle to determine which side to look at next and cuts it in half. For a list of 1000 items, a value will always be found within 10 probes.

Answer:

Details:

Product specifications, packaging, technical support and information (*Specifications*) refer to theUnited States retail English version only. Specifications for other versions may vary. All Specifications, claims, features, representations, and/or comparisons provided are correct to the best of our knowledge of the date of publication, but are subject to change without notice.OUR MAXIMUM AGGREGATE LIABILITY TO YOU AND THAT OF OUR DEALERS AND SUPPLIERS IS LIMITED. IT SHALL NOTEXCEED THE AMOUNT YOU PAID TO ACCESS THE INFORMATION. SEE LEGAL DISCLAIMER.