Print Queue [Day 5 - Advent of Code 2024 - Python] @0xdf
Print Queue [Day 5 - Advent of Code 2024 - Python]  @0xdf
Uploaded December 2024 | Updated November 2026, 3 hours ago
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: gitlab.com/0xdf/aoc2024
2024 AOC Intro vide: youtube.com/watch?v=4XKZZrhhiQE
VSCode Debug video: youtube.com/watch?v=cNhtk2Ob4B8

☕ Buy Me A Coffee: 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
Print Queue [Day 5 - Advent of Code 2024 - Python]Hacking Reportinator [Sans Holiday Hack 2023]Python UV for HackersDay 25 - Clock Signal [Revival of Code 2023 - Advent of Code 2016]Reading 700 QRs with Python [Quilt - Hacky Easter 2023]Day 17: Clumsy Crucible [AOC2023 Python]Creating a SSH Honeypot with PythonLinen Layout [Day 19 - Advent of Code 2024 - Python]Race Condition [Day 20 - Advent of Code 2024 - Python]Brute-Forcing File Read with MD5s [HackTheBox Intentions]Digging into OFBiz ExploitationAdvent of Code 2025 - Preview
0xdf |

Print Queue [Day 5 - Advent of Code 2024 - Python]

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER