Problem

Longest run of equal adjacent values.

Examples

  • longestRun([1, 1, 2, 2, 2]) -> 3
Compile and test (Ctrl+Enter)