Find a specific element using the binary lookup method. Requires input array length, input array elements, and keywords to find. The program output is found to be successful, flat, and the output lookup succeeds when the keyword is not specified in the array.
Technical points: Two-point search is binary find, the basic idea is: take the middle position of the record, and to find the key to compare, if equal, then find success. If the key is larger than its size, the element to be searched must be in the right child table, and the right child table will continue to be binary. If key is smaller than it is, the element to be searched must be in the left child table, and the left Dial hand table will continue to be binary-searched. This is recursive until the lookup succeeds or the lookup fails (the lookup range is 0).
One: Source program
Second: Running results
Two-point Search