Checkpoint: longest run
Challenge on lesson: Checkpoint: longest run
CHALLENGE
Difficulty: beginner+25 XP
Implement to spec: longestRun(String s) returns the length of the longest run of equal consecutive characters. "abbbcc" -> 3 (the run of b's); "abc" -> 1; single characters count as runs of length 1. Precondition: s has at least one character.
Press Submit to check your solution.
Back to lesson: Checkpoint: longest run