CT1105

The Moonlit charms of Bhavi

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Morning light hits the copper works of Verdigris as Bhavi unrolls the day's manifest of charms. The tally will decide the next shipment. 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| <= 53; s contains lowercase English letters.

Example 1:

Input: bcc
Output: 2

Example 2:

Input: cc
Output: 2

Example 3:

Input: cccccccccaacca
Output: 9

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Moonlit charms of Bhavi - EASY Coding Problem | CodeTikki