Python Discord is doing an event called Revival of Code, where we work through the 2016 Advent of Code, one challenge every two days. The day 9 challenge, Explosions in Cyberspace, I'm given a string where I need to find markers of the pattern `(AxB)`, and use that to read the next A characters and repeat it B times. In part one, I'll take markers inside the next A characters as just text. In part two, I'll have to recursively expand those first.
Repo for Advent of Code 2016 Solutions: https://gitlab.com/0xdf/aoc2016
Intro video for this event: • Introduction [Revival of Code 2023 - Adven...
Configuring VSCode to debug PyTest: • Configuring VSCode to Debug PyTest
Real Python post with templates: https://realpython.com/python-advent-...
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:14] Challenge Part 1
[01:20] genday.sh / input
[02:06] Part 1 tests
[03:27] Parsing into deque
[03:57] Part 1 solve
[07:16] Part 1 tests solve, submitting solution
[07:47] Challenge Part 2
[09:06] Tests for Part 2
[10:16] Refactoring part 1 into decompress
[11:30] Adding part 2
[16:20] Debugging issues
[16:50] Tests pass, part 2 doesn't return
[18:32] Debugging issues related to passing data twice
[19:45] Identified issue
[21:25] Fixing tests after refactor
[22:08] Conclusion
#ctf #adventofcode #revivalofcode #python