Sliding I Calculation for removing I
mp [ ord ( s [ i ] ) ] += 1 NEW_LINE if mp [ ord ( s [ i ] ) ] > 0 : NEW_LINE INDENT cnt += 1 NEW_LINE DEDENT i += 1 NEW_LINE j += 1 NEW_LINE if ans > n : NEW_LINE return " - 1" NEW_LINE return s [ start : start + ans ] NEW_LINE