Percent delimiters %w, zip - Day 06 - Advent of Code 2023

See how to solve the Day 6 "Race" puzzle for the advent of code with Ruby! We’ll determine how long to press a boat's speed button to beat distance records. We’ll talk about Ruby's %w delimiter to extract race times and distances. Then use `zip` to combine the time and distance arrays together.

We’ll increment a counter when the distance beats the record. By reducing these counters per race, we can find the final product.

While this approach works, faster alternative solutions are using the quadratic formula for a mathematical model or counting below threshold distances. This allows skipping unnecessary iterations.

Advent of Code:
My Solutions:

#adventofcode #ruby