Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Beat The Previous by wo.tomasz
def beat_previous(digits: str) -> list[int]:
lp = []
prev = -1
idx = 0
while len(digits) > 0:
nu = int(digits[0:idx+1])
if nu > prev:
lp.append(nu)
digits = digits[1 + idx:]
prev = nu
idx = 0
else:
idx += 1
if idx > len(digits):
break
return lp
Sept. 22, 2025
Comments: