diff --git a/4/cleanup.py b/4/cleanup.py index d091b9e..acb0b64 100644 --- a/4/cleanup.py +++ b/4/cleanup.py @@ -3,6 +3,9 @@ from aocd import submit def find_overlaps(sets: list) -> int: + """ + count the number of sets that overlap + """ overlaps = [1 if set.intersection(*pair) else 0 for pair in sets] return sum(overlaps)