Did I cheat at Advent of Code?

Yeah, a friend mentioned on twitter that there was a hack for this problem where you can make assumptions about the inputs and eliminate a bunch of looping and checking. I’m not making a judgement either way. Whatever solves the problem seems fine to me. Personally I wrote the O(n^2) solution similar to this since it was easy to understand and fast to write first. Once I had that I used the slow solution to validate a O(n) solution which seemed like a fun challenge.