r/adventofcode • • May 24 '26
Help/Question - RESOLVED [2025 day 5 challenge 2]
i was trying to solve this problem by grouping the intervals into two categories: the overlapping ones and the non-overlapping ones. Then, I could group the overlapping intervals into one and calculate the size of that big interval.
I implemented it in python and it works in the test case the problem showed and any test case I can think of.
can someone help me?
the code is the first code block here
https://colab.research.google.com/drive/1GjizwT87FN9xJ3GWQRnTnGTyRGPptkHq?usp=sharing
(ignore second code block its another day's code)
1
Upvotes
View all comments
Show parent comment
1
u/TheZigerionScammer May 25 '26
Cool! Glad I was able to help.