Garden Groups [Day 12 - Advent of Code 2024 - Python] @0xdf
Garden Groups [Day 12 - Advent of Code 2024 - Python]  @0xdf
Uploaded December 2024 | Updated November 2026, 3 hours ago
I'm given a grid with each point representing a type of crops. I'll need to find each contiguous region of the same crop, and then calculate the the cost to fence in that region. In part one, that's the size of the region times the perimeter. In part two, it's the size times the number of sizes on the region. I'll count sides by counting corners.

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
[00:57] Strategy
[02:02] Setup / data overview
[02:43] Parsing regions
[09:36] Fixing seen issues
[11:52] Perimeter function
[15:06] Calculating part 1 solution
[15:30] Fixing seen issues again
[18:16] Solving part 1
[18:41] Part 2 challenge
[19:53] Strategy
[21:28] Sides function
[25:09] Calculating part 2 soltuions
[25:21] Solving part 2
[25:32] Conclusion

#adventofcode #python
Garden Groups [Day 12 - Advent of Code 2024 - Python]Debofuscate JavaScript with webcrack [Meme Maker 3000 - Flare-On 2024]Day 3 - Squares With Three Sides [Revival of Code 2023 - Advent of Code 2016]awk Injection via JWT Forgery [HackTheBox - Awkward]SpeedNet - HackTheSystem CTFsudo chroot Tech Details [CVE-2025-32463]Threat Index [HackTheBox - Coding Challenge]Day 23: Long Walk [AOC2023 Python]Day 8 - Two-Factor Authentication [Revival of Code 2023 - Advent of Code 2016]Reversing and Brute-Forcing TOPT Browser Plugin Export [HackTheBox Coder]Web Assembly Reversing Challenge [CodeLocked - Hacky Easter 2023]Ceres Search [Day 4 - Advent of Code 2024 - Python]
0xdf |

Garden Groups [Day 12 - Advent of Code 2024 - Python]

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER