Please explain how can i solve this problem?

I am not able to approach the solution

@Deepanshu_garg did you understand the language of the problem

Sorry,I didn’t understand what you said

Actually I tried to solve it by firstly taking a as character to be replaced than b but I was not able to understand how to get the maximum length substring from it

@Deepanshu_garg did you solve this question if not let discuss

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.