count of longest consecutive elements in an array

Eg. I U Z X K K K K K H H H Q H H H H H H H
output: 7

How would you do it?
was there a question? this is a single straightforward for loop.

Topic archived. No new replies allowed.