Today I'm given input with a list of pairs of pages where the first page must be before the second, and then a list of numbers referred to as jobs. In part one, I'll check each job to see if it is valid, and if so, add up the middle number. In part 2, I have to sort the invalid jobs to fix them, and then sum those middle numbers. I'll use a custom sort function here.
2024 AOC repo: https://gitlab.com/0xdf/aoc2024/
2024 AOC Intro vide: • Introduction [Advent of Code 2024]
VSCode Debug video: • Configuring VSCode to Debug Python [AOC202...
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Part1 introduction
[01:15] Genday changes
[01:47] Setup / data overview
[02:24] Processing input
[05:05] Creating map for invalid orders
[07:43] Function to check job
[10:00] Fixing bugs
[12:34] Solving part 1
[12:57] Part 2 challenge
[13:14] Part 1 refactor
[13:57] Structure for part 2
[14:34] Custom sorting function
[16:27] Solving part 2
[16:47] Conclusion
[17:06] Revisit day 4
#adventofcode #python
Sur cette page du site, vous pouvez voir la vidéo en ligne Print Queue [Day 5 - Advent of Code 2024 - Python] durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur 0xdf 05 décembre 2024, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 580 fois et il a aimé 19 téléspectateurs. Bon visionnage!