If the current element is atleast dif difference apart from the previously selected element then select the current element and increase the count
if ( arr [ i ] >= ( prev + dif ) ) : NEW_LINE INDENT count += 1 NEW_LINE DEDENT