this algorithm is known as binary search we give python implementation in code fragment and an illustration of the execution of the algorithm in figure whereas sequential search runs in (ntimethe more efficient binary search runs in (log ntime this is significant improvementgiven that if is one billionlog is only (we defer our formal analysis of binary search' running time to proposition in section def binary search(datatargetlowhigh) """return true if target is found in indicated portion of python list the search only considers the portion from data[lowto data[highinclusive "" if low high return false interval is emptyno match else mid (low high/ if target =data[mid]found match return true elif target data[mid] recur on the portion left of the middle return binary search(datatargetlowmid else recur on the portion right of the middle return binary search(datatargetmid highcode fragment an implementation of the binary search algorithm low mid high low mid high low mid high low=mid=high figure example of binary search for target value