I ran out of time to find a better solution to Advent of Code Day 5 part 2. So I let the brute force algorithm run over night and to my surprise after 4h 14m of execution time it spit out the right answer 😎