Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Long Repeat by tokiojapan55
def long_repeat(line: str) -> int:
result = 0
while len(line) > 0:
count = 1
c, line = line[0], line[1:]
while len(line) > 0 and c == line[0]:
count += 1
line = line[1:]
if result < count:
result = count
return result
June 12, 2020