Please take a look my code is not passing test cases can you tell my errors in my code

Hello @anshulgurawalia please wait i am checking your code:

@anshulgurawalia no no your approach is not correct in this we have to first check that which pair is giving the string of max lenght after k replacements but you are directly making change in them if you are finding two cintinuous same characters.

would you like me to share the approach of solving this?