Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
itertools.groupby solution in Clear category for Long Repeat by m.kurapov
from itertools import groupby
def long_repeat(line: str) -> int:
return 0 if line=='' else max(len(''.join(group)) for key, group in groupby(line))
March 19, 2020
Comments: