Skip to content

Commit

Permalink
Add another note
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed Jan 19, 2024
1 parent 6b66980 commit 2e7af08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions day21/src/day21.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ long OccupiedCountSmart(List<List<long>> maze, int steps)
counts.Add(current.Count);
}
// Then extrapolate the quadratic sequence
// (degree 2 case of polynomial extrapolation using finite differences)
var diffs = Differences(counts); // Should be an arithmetic progression
var diffs2 = Differences(diffs); // Should be a list of equal values
for (int i = 0; i < fullLengthSteps; i++)
Expand Down

0 comments on commit 2e7af08

Please sign in to comment.