mirror of
https://github.com/fredrikr79/advent_of_code.git
synced 2025-12-27 12:40:21 +01:00
part 1
note: has a runtime complexity of O(n * length of line) for n lines. so its essentially O(n^2), but not really because the length of each line is much lower than the amount of lines. that sort of makes it feel linear with a constant of maybe 5.
part 2
- solution
- changed
NotIDto more concise⊞≠.⇡
note: this one has horrible runtime complexity. it uses the previous solution from part 1, but with an additional O(n^2) for each line (because it computes the not of an identity matrix equal to the length of each line). sounds like O(n^3). no wonder it takes a little while to run the code with the input. it should be possible to get O(n^2).