Gift Shop [AOC2025 Day 2] @0xdf
Gift Shop [AOC2025 Day 2]  @0xdf
Uploaded December 2025 | Updated November 2026, 1 hour ago
Advent of Code 2025 Day 2 offers input with a bunch of number ranges. I'll parse those, and then loop through each, check for any invalid numbers and summing them up for a result. In part 1, a range is invalid if the entire number is made up of the same number twice. For part 2, I need to check if the number is made up of a number repeated two or more times. So for part 1, 123123 is invalid. For part 2, 123123 is still invalid (123 twice), but so is 123123123 (123 three times). I'll show two ways in part 1, using just a string check and with regex, and then adapt the regex function to solve part 2 very quickly. Then Claude solves and implements the non-regex solution.

Solutions Repo: gitlab.com/0xdf/aoc2025
VSCode Debug Setup: youtube.com/watch?v=cNhtk2Ob4B8
Claude: claude.ai

☕ Buy Me A Coffee: buymeacoffee.com/0xdf

[00:00] Introduction
[01:22] Pulling / examining input
[01:57] Parsing ranges
[03:16] Checking validity
[04:33] Solving part 1
[05:28] Rechecking validity with regex
[07:27] Part 2 introduction
[07:55] New is_invalid function for part2
[08:55] Solving part 2
[09:26] Talking through non-regex solution
[09:59] Solving with Claude
[11:30] Comparing solutions
[12:05] Conclusion

#AdventOfCode #claude
Gift Shop [AOC2025 Day 2]Crossed Wires [Day 24 - Advent of Code 2024 - Python]Exploiting CVE-2023-40028 [LinkVortex - HackTheBox]Day 9 - Explosions in Cyberspace [Revival of Code 2023 - Advent of Code 2016]Tracing Automations in HackTheBox Mailroom [Beyond Root]Christmas Tree Farm [AOC2025 Day 12]Simple Use After Free Exploitation [Hackvent 2022 - Day 21]Factory [AOC2025 Day 10]Introduction [Revival of Code 2023 - Advent of Code 2016]QuickScan [HackTheBox Cyber Apocalypse CTF 2024]Day 15: Lens Library [AOC2023 Python]Day 7: Camel Cards [AOC2023 Python]
0xdf |

Gift Shop [AOC2025 Day 2]

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER