Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Beat The Previous by tokiojapan55
def beat_previous(digits: str) -> list[int]:
ans, value, token, nums = [], -1, "", list(digits)
while nums:
token += nums.pop(0)
if value < int(token):
value = int(token)
ans.append(value)
token = ""
return ans
Aug. 8, 2023