Stores count of distinct values of arr [ i ] - x * i
if ( ( arr [ i ] - x * i ) in mp ) : NEW_LINE INDENT mp [ arr [ i ] - x * i ] += 1 NEW_LINE DEDENT else : NEW_LINE INDENT mp [ arr [ i ] - x * i ] = 1 NEW_LINE DEDENT