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: https://adventofcode.com/
My Solutions: https://gist.github.com/cjavdev/d15a2a4ffed6c840c2fb28a093e9f927/
Playlist https://www.youtube.com/playlist?list=PLS6F722u-R6KYlGyUv65EFpGKl2Esmurr

#adventofcode #ruby