Left will move in left direction and compare difference between itself and element left to it
while ( left - 1 >= 0 and abs ( arr [ left ] - arr [ left - 1 ] ) <= K ) : NEW_LINE INDENT left = left - 1 NEW_LINE tmp = tmp + 1 NEW_LINE DEDENT