If arr [ j ] = = arr [ i ] decrement j until arr [ j ] != arr [ i ]
while ( j >= 0 and arr [ j ] == arr [ i ] ) : NEW_LINE INDENT j -= 1 NEW_LINE DEDENT if ( j < 0 ) : NEW_LINE INDENT break NEW_LINE DEDENT