From 3781e2885151c5727c6c457f325e4f7a7ffa76c7 Mon Sep 17 00:00:00 2001 From: Sebastian Lindemeier Date: Fri, 4 Dec 2026 08:05:28 +0100 Subject: [PATCH] Refactor Day04 min instruction length naming for readability --- AoC_2026/Day04.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AoC_2026/Day04.cs b/AoC_2026/Day04.cs index 5e00676..5f98471 100644 --- a/AoC_2026/Day04.cs +++ b/AoC_2026/Day04.cs @@ -29,11 +29,11 @@ public class Day04 : IPuzzleSolver 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; }