CT936

The inscriptions Longest Streak Puzzle

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

It is audit day at the mangrove channels of Rootwater. Gautam spreads the inscriptions records across the table and picks up a sharp pencil. Task: Print the length of the longest run of the same character. Input format: One line with a single lowercase string s. Output format: Print the maximum run length. Constraints: 1 <= |s| <= 77; s contains lowercase English letters.

Example 1:

Input: ccccccccccccccccccccccccccccaabbbbbaaaaab
Output: 28

Example 2:

Input: bbccccbbbbaaaabbbbbaaaaaaaab
Output: 8

Example 3:

Input: ccaaaaabbbacccccbbbbbccccc
Output: 5

Constraints:

1 <= |s| <= 77; s contains lowercase English letters.

Loading...
Test Cases:No test cases
No test cases available.
The inscriptions Longest Streak Puzzle - EASY Coding Problem | CodeTikki