Consecutive Characters
Find the maximum length of a substring containing the same character. Scan the string once, tracking the current run length and updating the maximum seen so far.
Find the maximum length of a substring containing the same character. Scan the string once, tracking the current run length and updating the maximum seen so far.