From 2f10206d01ca5b863515535b21b475f63c34207c Mon Sep 17 00:00:00 2001 From: Sebastian Lindemeier Date: Sun, 6 Dec 2026 17:12:35 +0100 Subject: [PATCH] Refactor 2026 Day06 dictionary merge to reuse existing value --- AoC_2026/Day06.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AoC_2026/Day06.cs b/AoC_2026/Day06.cs index caf02ed..bd1b63e 100644 --- a/AoC_2026/Day06.cs +++ b/AoC_2026/Day06.cs @@ -36,7 +36,7 @@ public class Day06 : IPuzzleSolver HashSet value) where TKey : notnull { if(dictionary.TryGetValue(key, out var existing)) - dictionary[key].UnionWith(value); + existing.UnionWith(value); else dictionary[key] = value; }