mirror of
https://github.com/cupcakearmy/advent-of-code.git
synced 2024-12-23 00:26:27 +00:00
16 lines
378 B
Markdown
16 lines
378 B
Markdown
|
# 7
|
||
|
|
||
|
This one was maybe the coolest yet! Fixed-point iteration and some recursion. Amazing :)
|
||
|
|
||
|
For the first part we iterate as long as we don't find any enclosing bags anymore. This can build long chains.
|
||
|
|
||
|
The second we recurse down the bag chain und sum it up recursively.
|
||
|
|
||
|
<details>
|
||
|
<summary>Solutions</summary>
|
||
|
<ol>
|
||
|
<li>164</li>
|
||
|
<li>7872</li>
|
||
|
</ol>
|
||
|
</details>
|