Advent of Code 2022 Day 9 Walk-Through

preview_player
Показать описание

Please attempt the problem on your own before watching this video!
Рекомендации по теме
Комментарии
Автор

thanks - i had a such a hard time with part 2 for some reason, and even after staring at your code and comparing it against mine, I could figure out what i was doing I did. Anyways, thanks for pointing me in the right direction.

daybreak_eats
Автор

You're a fantastic communicator. Subscribed

Meridian-lkfo
Автор

This was exactly my line of thought, although alot slower to get there lol

KayB
Автор

today was perfect for complex numbers instead of lists!

SqueezeWizard
Автор

I used a stack where I push the movement of the head and pop to the tail only when it's too far, at the end I used a set to add all the movements of the tail. The complicated part was to define "too far" which I solved calculating the distance.
By the way I hope you aced your test 😊

glitchinLife