Skip to content

Commit 2434b3b

Browse files
Update docs on Thu Dec 19 06:51:31 UTC 2024
1 parent d945cb8 commit 2434b3b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

2024/19/index.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,9 @@ <h2 id="problem-name">Linen Layout</h2>
319319
cache.GetOrAdd(pattern, (pattern) =&gt;
320320
pattern switch {
321321
&quot;&quot; =&gt; 1,
322-
_ =&gt; (
323-
from towel in towels
324-
where pattern.StartsWith(towel)
325-
select MatchCount(towels, pattern[towel.Length..], cache)
326-
).Sum()
322+
_ =&gt; towels
323+
.Where(pattern.StartsWith)
324+
.Sum(towel =&gt; MatchCount(towels, pattern[towel.Length ..], cache))
327325
}
328326
);
329327
}</code></pre></div>

0 commit comments

Comments
 (0)