Pages

Friday, November 30, 2012

Design an algorithm, draw a corresponding flow chart and write a 'C' program for Binary Search, to search a given number among the list of numbers.

a binary search or half-interval search algorithm finds the position of a specified value (the input "key") within a sorted array. In each step, the algorithm compares the input key value with the key value of the middle element of the array. If the keys match, then a matching element has been found so its index, or position, is returned. Otherwise, if the sought key is less than the middle element's key, then...

AD