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 780a66b commit a1ebf64Copy full SHA for a1ebf64
2022/Day06/Solution.cs
@@ -10,7 +10,7 @@ class Solution : Solver {
10
public object PartTwo(string input) => StartOfBlock(input, 14);
11
12
// Slides a window of length l over the input and finds the first position
13
- // where each character is different. Returns the right of the window.
+ // where each character is different. Returns the right end of the window.
14
int StartOfBlock(string input, int l) =>
15
Enumerable.Range(l, input.Length)
16
.First(i => input.Substring(i - l, l).ToHashSet().Count == l);
0 commit comments