If elements of any pair are equal and their frequency is not divisible by 2 update the isArrayPossible variable to false and break through the loop
if ( first == s1 - first ) : NEW_LINE INDENT if ( mp [ first ] % 2 != 0 ) : NEW_LINE INDENT isArrayPossible = False ; NEW_LINE break ; NEW_LINE DEDENT DEDENT