Practice · 2 of 4
Fix: longest run counter
CHALLENGE
Difficulty: advanced+25 XP
The method should return the length of the **longest run of equal adjacent values**. Example failure: {1, 2, 2, 3, 3, 3, 1} returns 3 (correct) but {2, 2, 1, 1} returns 3 (wrong — should be 2). Find and fix the bug.
Press Submit to check your solution.
Back to lesson: Practice: Debug gauntlet: one bug each