Files
advent_of_code/2024/day_2/uiua
Fredrik Robertsen d2753ff275 Update README.md
2024-12-02 19:32:16 +01:00
..
2024-12-02 19:32:16 +01:00

part 1

solution

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

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).