Wednesday, December 6, 2023

Advent of Code 2023 - Day 6 - Salesforce Apex

Lot's of ways to approach this, I implemented the iterative approach for part 1, stepping through each variance in the range. 

Part 2 was a much larger range to search against and the iterative approach wouldn't work given CPU limits. Instead I used a binary search to find the low and high ends of the range that meet the criteria, and then find the difference for the possible solutions. 

For fun I also implemented a straight math solution using a quadratic formula. This is by far the fastest solution.  

--- Day 6: Wait For It ---

https://adventofcode.com/2023/day/6

Advent Calendar Progress

Tuesday, December 5, 2023

Advent of Code 2023 - Day 5 - Salesforce Apex

--- Day 5: If You Give A Seed A Fertilizer ---

https://adventofcode.com/2023/day/5

Advent Calendar Progress


Monday, December 4, 2023

Advent of Code 2023 - Day 4 - Salesforce Apex

--- Day 4: Scratchcards ---

https://adventofcode.com/2023/day/4

Advent Calendar Progress


Sunday, December 3, 2023

Advent of Code 2023 - Day 3 - Salesforce Apex

Day 3 was traversing a grid of data. Finding certain coordinates based on criteria, and then exploring adjacent coordinates for values. A nice slightly difficult challenge for only Day 3.

--- Day 3: Gear Ratios ---

https://adventofcode.com/2023/day/3

Advent Calendar Progress



Saturday, December 2, 2023

Advent of Code 2023 - Day 2 - Salesforce Apex

Day 2 was slightly less complicated than Day 1. Some string parsing and map collections helped with Part 1. Part 2 was similar parsing with a few edits to find the power of the minimum cube values.

--- Day 2: Cube Conundrum ---

https://adventofcode.com/2023/day/2

Advent Calendar Progress