Shopee | Longest substring with character A appearing at-most k times
Anonymous User
605

**Problem Statement **:
You are provided with 3 parameters - length, k times, string.
Find the longest substring where character 'A' appears atmost k times.

For example -

8 2
ACGTSDTA

Answer : 8.
In entire string A appears 2 times, so answer is 8

Another example:
10 2
ACASATSSKSDFFA
Answer: 10.
ATSSKSDFFA

Comments (2)