Company: Microsoft_12july
Difficulty: medium
Longest Substring With At Most K Normal Characters Problem Description In a specific language, characters are categorized as either special or normal. A character is considered special if its value is '1' and normal if its value is '0'. Given a string s , return the length of the longest substring of s that contains at most k normal characters. The classification of characters is defined by a 26-digit bit string named charValue , where each digit corresponds to a lowercase letter in the English alphabet. For clarity, the alphabet is aligned with charValue below: alphabet = abcdefghijklmnopqrstuvwxyz charValue = 10101111111111111111111111 In this example, 'a' (index 0) has a charValue of '1', meaning it's special. 'b' (index 1) has a charValue of '0', meaning it's normal. So, 'a' is special, 'b' is normal, 'c' is special, 'd' is normal, 'e' is special, etc. Consider the string s = 'abcde' and k = 2 . Based on the charValue = '10101111111111111111111111' : 'a' (index 0) is special (value