educative.io

Educative

Can this be solved similarly as the "Longest substring with same letters after replacement"? I solved it using this exact solution and all test cases passed

Can this be solved similarly as the “Longest substring with same letters after replacement”? I solved it using this exact solution and all test cases passed

Hey @Sat_Palshetkar

Yes, both problems can be solved with the same solution, as the solution implies replacing K letters/characters, so they can be 0s, 1s or they can be letters like a,b,c,d

Shaheryaar Kamal | Technical Content Engineer