Refactor 2026 Day06 BFS initialization order

This commit is contained in:
Sebastian Lindemeier committed 2026-12-06 13:38:38 +01:00
1 parent 1faf120a47
commit 170bab3c29
1 file changed
+2 -2
+2 -2
View File
@@ -106,8 +106,8 @@ public class Day06 : IPuzzleSolver<string>
private static int GetMinDistanceTo(string from, string to, Dictionary<string, HashSet<string>> gridInstructions)
{
var queue = new Queue<(string, int)>();
queue.Enqueue((from, 0));
var seen = new HashSet<string>();
queue.Enqueue((from, 0));
while (queue.Count > 0)
{
var (current, distance) = queue.Dequeue();
@@ -137,8 +137,8 @@ public class Day06 : IPuzzleSolver<string>
{
var maxDistance = 0;
var queue = new Queue<(string, int)>();
queue.Enqueue((from, 0));
var seen = new HashSet<string>();
queue.Enqueue((from, 0));
while (queue.Count > 0)
{
var (current, distance) = queue.Dequeue();