diff options
| author | Louis Burda <quent.burda@gmail.com> | 2023-04-08 12:40:30 -0400 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2023-04-09 10:21:36 -0400 |
| commit | 9282e95e8844afe856ba76ceb6d2c3010df8bb1a (patch) | |
| tree | e35affc89b20324371381e079f7cb5f8a06aa81b /src/23/notes | |
| parent | 2b5d4232879dc74491dabf54a0ddc958d66ebcec (diff) | |
| download | aoc2020-zig-master.tar.gz aoc2020-zig-master.zip | |
Diffstat (limited to 'src/23/notes')
| -rw-r--r-- | src/23/notes | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/23/notes b/src/23/notes new file mode 100644 index 0000000..0fc11ad --- /dev/null +++ b/src/23/notes @@ -0,0 +1,14 @@ +we start with a list of numbers 1 to 1mil + +10 million rounds of moving 3 items from one place to another (depending on input) + +need to know the product of two labels after cup 1 + +- is the product itself predictable? + - No, its the same as a random product of two numbers between 1 and mil +- can we optimize our algo for part 1? + - 1 million numbers (1MiB * 8) is not too bad, but 10 million rounds of ordered removes and inserts is very computationally intense.. could fix that with a linked list +- can we reduce the search space? + - for cup 1 we need to know the two cups after it.. those cups were placed there either during a round + where 2 was the current or when 1 was the current and numbers between 1 and the ones next to it now were moved (not really predictable) + |
