Playground [AOC2025 Day 8] @0xdf
Playground [AOC2025 Day 8]  @0xdf
Uploaded December 2025 | Updated November 2026, 3 hours ago
Advent of Code 2025 Day 8 involves connecting points in order of their distances apart. In part 1, I'll connect the closest 1000 points, and find the size of the three largest resulting sets. In part 2, I'll run until all the points are in one large set, calculating the answer from the x coordinates of the last two joined boxes. I'll use Union Find to manage my sets. Claude solves it almost the exact same way, other than that it uses a seperate loop for each part, whereas I did it in one loop.

Union Find Writeup: cp-algorithms.com/data_structures/disjoint_set_union.html
Union Find Video: youtube.com/watch?v=ayW5B2W9hfo
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:18] Pulling / examining input
[01:55] Processing points
[03:02] Calculating distances
[05:52] Union Find overview
[07:51] Create parent structure
[09:21] find_set function
[10:36] merge_sets function
[11:16] Merge closest sets
[12:50] Calculating set sizes
[14:10] Calculating part1 solution
[16:10] Solving part 1
[16:46] Part 2 introduction
[17:05] Strategy
[17:43] Refactoring dists loop
[18:45] Counting merges
[20:14] Finishing refactor of part 1
[20:48] Solving part 2
[21:05] Recapping solution
[21:29] Solving with Claude
[22:50] Analysis of Claude's solution
[26:29] Conclusion

#AdventOfCode #claude
Playground [AOC2025 Day 8]Copy Fail Explained [CVE-2026-31431]LAN Party [Day 23 - Advent of Code 2024 - Python]Day 21: Step Counter [AOC2023 Python]Exploring Docker Registry Auth [HackTheBox RegistryTwo]Day 1 - No time for a Taxicab [Revival of Code 2023 - Advent of Code 2016]Python Directory Traversal Exploit [Yummy - HackTheBox]Addition [HackTheBox - Coding Challenge]Binary Analysis of notes [HackTheBox Gofer]Configuring VSCode to Debug PyTestExploring a Flask App with SSTI [HackTheBox Sandworm]Day 22: Monkey Map [AOC2022 Python]
0xdf |

Playground [AOC2025 Day 8]

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER