← Questions
Longest run of identical consecutive items
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Given a sequence, such as a string or the list of shows a user watched in order, return the longest run of the same item repeated back to back: its length and the item (and its position if asked). Handle ties and the empty input, in one pass.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
