Day 13: Point of Incidence | Advent of Code 2023

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

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

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

    In part one we have a method that finds a reflection point (horizontal or vertical) where there are 0 errors between reflected lines.
    So for part two we can run the same method but looking for exactly one error instead of 0! I tried this thinking I was probably missing something and was quite surprised when it worked!

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

    In part 2, Instead of trying every substitution, I iterated over rows, and kept a tally of the total number of differing characters. If that exceeded 1, I had an early stop, and if it wasn't 1 in the end the line wasn't a smudged mirror location.

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

    Nice!
    In the second grid in the sample, it changes the fifth symbol in row 2, but why couldn't it be the fifth in row 1 to a dot, please?
    #...##..#
    #....#..#