If middle element is different of the arrays , it means that the index we are searching for is either mid , or before mid . Hence we update right to mid - 1.
else : NEW_LINE INDENT index = mid NEW_LINE right = mid - 1 NEW_LINE DEDENT