educative.io

What input will cause it to return -1

Any examples to show it is returning -1 (means we can’t replace the characters at all). I am little bit confused

If i pass “a” as the input string and k=2 should I return -1