Driver Code
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT arr = [ " contribute " , " geeks " , " ide " , " practice " ] ; NEW_LINE x = " ide " NEW_LINE result = binarySearch ( arr , x ) NEW_LINE if ( result == - 1 ) : NEW_LINE INDENT print ( " Element ▁ not ▁ present " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " Element ▁ found ▁ at ▁ index " , result ) NEW_LINE DEDENT DEDENT