Skip to content

TomNug/AdventOfCode2023

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdventOfCode2023

My repository for my solutions for 2023's Advent of Code (https://adventofcode.com/). It is an advent calendar of programming problems. Problem descriptions have been copied into READMEs for convenience. They are not mine and belong to Advent of Code.

What I have learned

Day 1 - Parsing strings for values of numeric words and characters

Learning how to implement regex in C#.

Day 2 - Parsing strings for values of the number of coloured cubes drawn

Further practise with regex. Using xUnit to implement tests for Day 1. Used xUnit as part of development for Day 2, testing each element as it was made before proceeding.

Day 3 - Parsing a grid of characters to identify larger numbers within and proximity to specific symbols

Test-driven development where tests are created before the implementation helped my understanding of the problem and each stage. Used MemberData in xUnit to allow for more complext test data.

Day 4 - Parsing strings to identify sets of numbers and performing calculations based on the intersections

More test-driven development helped with the process. Made progress in secure increments and was confident in my code. More complex regex patterns, so more good practise. Using sets and intersections to find crossover between numbers.

Day 5 - Parsing strings to identify sets of numbers which define arithmetic functions applied to specific ranges of numbers. Processing numbers through these functions.

Testing is such a stress relief. Instead of processing each number in a large range, can instead work with the limits of the range instead. More practice with regex.

Day 6 - Using the quadratic equation to spare brute force

Unit tests narrowed the problem when debugged, making development easier. More regex.

Day 7 - Parsing card hands and ranking them

Test-driven development making development calmer, and easier to debug. More regex. Implementing IComparable with custom CompareTo.

Day 8 - Parsing series of crossroads with left and right turn options that lead to further crossroads, finding steps from start point to destination

Regex, Dictionaries, Prime factorization, Lowest Common Multiples. If the only option is a bruteforce which is taking too long, assumptions need updating.

Day 9 - Extrapolating sequences to identify subsequent and preceeding numbers

Regex, stacks.

Day 10 - Determinining connectivity of nodes on a grid based on their symbols, traversing the grid to find loops of symbols, and unreachable elements.

Flood-fill algorithm, queues, 2D arrays, breadth-first search.

Day 11 - Distances between cartesian coordinates

Cartesian coordinates.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages