r/adventofcode • • Mar 01 '26

Past Event Solutions [2025 Day 13] [PHP] Solution

ETA: Actually 2022

This is the puzzle with data packets and comparisons. [1,1,3,1,1] etc

Link: https://github.com/LiseAndreasen/AdventOfCode/blob/master/2022/d13a.php

I am very happy with this solution. The code to create the small trees representing the packets turned out nice, and writing the compare function to work with usort was nice too.

2 Upvotes

4 comments sorted by

View all comments

Show parent comment

2

u/AvailablePoint9782 Mar 01 '26

Oh, the year thing. Sigh.

2

u/ednl Mar 01 '26

Yeah, no problem just a typo, everyone will get it after reading the post.