Practice · 4 of 6
Longest run
CHALLENGE
Difficulty: intermediate+25 XP
Return the **length of the longest run** of identical adjacent characters. Case matters: 'b' and 'B' are different characters. Implement process(String s) (0 for empty).
Example: "aaBBBbc" → 3 (the BBB run).
Press Submit to check your solution.
Back to lesson: Practice: String lab: transformations under constraints