Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Lists solution in Clear category for Beat The Previous by kkkkk
def beat_previous(digits: str) -> list[int]:
"""Return list of increasing digits from string of digits."""
digits_in_order = []
last_digit = -1
current_digit_str = ""
for digit in digits:
current_digit_str += digit
if int(current_digit_str) > last_digit:
last_digit = int(current_digit_str)
digits_in_order.append(last_digit)
current_digit_str = ""
return digits_in_order
Sept. 23, 2023