Code formatting and warning fixing.

This commit is contained in:
2024-12-01 17:36:23 +01:00
parent 9f8d966b7a
commit dafd2526d1
93 changed files with 739 additions and 823 deletions

View File

@@ -1,4 +1,3 @@
using System.Text;
namespace AdventOfCode2023;
@@ -212,7 +211,7 @@ public class Day12 : IDay
{
throw new Exception("Invalid input");
}
if (springsRecord.Length < damagedSprings[0])
{
// Invalid match; Not enough data on record for the current damagedSprings group
@@ -230,7 +229,7 @@ public class Day12 : IDay
// Skip current damagedSprings group
return CountPossibleArrangements(springsRecord.Substring(damagedSprings[0]), damagedSprings.Skip(1).ToArray());
}
if (springsRecord.Length < (damagedSprings[0] + 1) || springsRecord[damagedSprings[0]] == '#')
{
// Invalid match; There must be an operational (or unknown) spring between damaged spring groups