partition and inject intersection &:& 👯‍♂️ - Day 13 - Advent of Code 2023

Поделиться
HTML-код
  • Опубликовано: 27 янв 2025

Комментарии • 3

  • @MikeBifulco
    @MikeBifulco Год назад +1

    You are truly a brilliant teacher, my dude.

  • @piotrtalarczyk8987
    @piotrtalarczyk8987 Год назад

    OK. After lots of work finally, I managed to solve 1st puzzle of day 13th by counting same rows:
    same_rows = Hash.new([])
    pattern.each_with_index{|row,i| same_rows[row] += [i] }
    Oh, your brute force method was nice. I have to remember that sometimes simply methods are right ones.