Day 12 Remove unused import

This commit is contained in:
Stefan Forstenlechner 2021-12-12 13:05:57 +01:00
parent aef252b460
commit 16178b5f04
1 changed files with 2 additions and 5 deletions

View File

@ -1,7 +1,6 @@
#define Day12
#if Day12
using System.Collections.Immutable;
using System.Diagnostics;
using AoC2021;
const string START = "start";
const string END = "end";
@ -37,8 +36,7 @@ long PathCountPart1(Dictionary<string, ImmutableHashSet<string>> paths, Immutabl
foreach (var a in adjacent) {
if (a.ToLower() == a) {
count += PathCountPart1(paths, visitedSmallCaves.Add(a), a);
}
else {
} else {
count += PathCountPart1(paths, visitedSmallCaves, a);
}
}
@ -58,8 +56,7 @@ long PathCountPart2(Dictionary<string, ImmutableHashSet<string>> paths, Immutabl
foreach (var a in adjacent) {
if (a.ToLower() == a) {
count += PathCountPart2(paths, visitedSmallCaves.Add(a), a, twice || visitedSmallCaves.Contains(a));
}
else {
} else {
count += PathCountPart2(paths, visitedSmallCaves, a, twice);
}
}