We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 990a4af commit 3c3c769Copy full SHA for 3c3c769
2024/day19/solution.py
@@ -15,7 +15,7 @@ def no_ways(design):
15
for pattern in patterns:
16
if design[:len(pattern)] == pattern:
17
to_check.append(pattern)
18
- if len(to_check) == 0:
+ if not to_check:
19
return 0
20
else:
21
return sum(no_ways(design[len(pattern):]) for pattern in to_check)
0 commit comments