Refactor Day04 min instruction length naming for readability

This commit is contained in:
Sebastian Lindemeier committed 2026-12-04 08:05:28 +01:00
1 parent 7e120081c1
commit 3781e28851
1 file changed
+3 -3
+3 -3
View File
@@ -29,11 +29,11 @@ public class Day04 : IPuzzleSolver<long>
private static int GetMinInstructionLength(string barcode)
{
for (var i = 1; i <= barcode.Length; i++)
for (var patternLength = 1; patternLength <= barcode.Length; patternLength++)
{
var pattern = barcode[0..i];
var pattern = barcode[0..patternLength];
if(CreatesBarcode([..pattern], barcode))
return pattern.Length;
return patternLength;
}
return barcode.Length;
}