This operation is apply to search an element of interest in an array.
Input: KEY is the element is to be search.
Data Structure: An array A[L … U] //L and U are lower and Upper bounds of array.
i = L, found =0, location =0 //found = 0 indicates search is not finished and unsuccessful. while(i<=U) and (found=0) do //Compare if all or any one condition does not satisfy if Compare(A[i], KEY) = TRUE then // if KEY is found. found = 1 location = i else i = i+1 // Move to the next location EndIf EndWhile If found = 0 then print "Search is unsuccessful : KEY is not the array" Else print "Search is successful : KEY is in the array at location", location EndIf Return(location) Stop