Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
recursion with index and max solution in Clear category for Colorful Disks by kurosawa4434
def count_discs(discs: tuple[int, ...]) -> int:
return len(discs) and 1 + count_discs(discs[discs.index(max(discs)) + 1:])
Feb. 20, 2024
Comments: