Advent Of Code 2025
December 14, 2025 ยท View on GitHub
My solutions for the Advent of Code 2025, using .NET 10 and C# 14.
A few rules and goals I set for myself:
- All solutions are self-contained, meaning:
- Each solution has exactly one code file and one project file
- No external dependencies / NuGet packages
- No shared libraries or extensions
- Use top-level statements only and reduce file length
- No namespaces, no explicit main method
- All code files are less than 100 lines
- Moving usings to the project files is allowed
- All while still maintaining a decent level of readability
- Find reasonably efficient algorithms
- Each solution should complete in less than one second
- The required memory should be less than 1 GB
A few things I learned / tried out with this project:
- The Enumerable.SequenceEqual method for quickly comparing arrays
- Record classes with primary constructors for concise immutable types
- The PriorityQueue collection type for an efficient sorted collection
- The BitOperations.PopCount method for counting the bits set in an unsigned number
- The new SLNX solution format with a lot less boilerplate compared to SLN