Solving day 10 of Advent of Code 2022 in JavaScript

preview_player
Показать описание
Advent of Code is a website that releases a new programming puzzle every day between the 1st and the 25th of December.

0:00 Parsing
3:10 Part 1
22:28 Part 2

Have fun!

Рекомендации по теме
Комментарии
Автор

Love your coding style! I only know some Python and R, but the way you explain your thought process makes me seamlessly read along in js. Great videos!

vlinden
Автор

The classes for CPU and CRT make a lot of sense here again. It helped clarify the business logic.
I just had an array of the register output, and I then did operations on that for part 1 and part 2.

queuebit
Автор

Thought about using a class today as well - the printScreen command has a nice touch. Went without it and basically arrived at the same code, just without classes. The x/y coordinates with Math.floor and the modulo were exactly like yours 😅 🙌 nice one today. And it’s amazing to see how much better I already got in thinking in these data structures. Huge thank to you for that!

HerrSiering