Advent of Code 2020, Day 1, Part One - Solved with Ruby

preview_player
Показать описание
I code up and walkthrough a solution to Part One of Day 1 of Advent of Code 2020 using Ruby. I get to use a couple cool Ruby features like each_with_index enumerable method and the throw/catch construct.
Рекомендации по теме
Комментарии
Автор

A oneliner version: { _1 + _2 == 2020 }.map { _1 * _2 }`

AntonStyagun