Advent of Code 2022 Day 5 Solve

preview_player
Показать описание
Recording of me solving day 5 of Advent of Code 2022 in Python. Finished rank #20 and #25 for each part.

Finish times:
Part 1: 4:46
Part 2: 5:29 (+0:43)

Solid performance today! Hardcoded ("manually parsed") the initial crate configurations since I thought it would probably be faster than writing code to parse it, although I'm not so sure after the fact. After that, things were relatively straightforward implementation, although I spent longer than I should've writing the parsing for "move a from b to c" - I have a nums() function prewritten that does this all for me, but I thought it wasn't working so I defaulted to doing it the ugly way.

0:00 - Part 1
4:53 - Part 2
5:35 - Commentary
8:22 - Explanation
Рекомендации по теме
Комментарии
Автор

if you used an editor with multi-cursor support you'd probably have been able to parse the stacks by hand a good bit faster

odoo-sam
Автор

bro if you put some rocket emojis, probably get 100 more views

polarmac
Автор

Downvoted for manually writing stacks in a different, easy to parse form. What if you had 1000 stacks? would you still do it manually?

agataimaciejziarko