Infytq round for (SSE)String problem

Does anyone have a solution in efficient way for this problem!!

Sample casesMmm???..

Make index array for each character a,b,c and then apply two ptr method for each of array.take maximum of 3 that will be your ans.if k is more than your window size then string length is your answer.

1 Like