mirror of
https://github.com/cupcakearmy/advent-of-code.git
synced 2024-11-01 08:04:12 +01:00
16 lines
552 B
Markdown
16 lines
552 B
Markdown
# 13
|
|
|
|
Back to easy mode for now.
|
|
|
|
So i used the `json` parse method to parse the input. No need to write our own parser. From there recursion if your friend and if you simply implement the rules you get to part 1 quickly.
|
|
|
|
Part 2 was also straight forward. Instead of returning `True` or `False`, just return `-1, 0, 1`, add the `[[2]]` and `[[6]]` into the lines and use the built sort algorithm with your comparator from part 1 and you're done.
|
|
|
|
<details>
|
|
<summary>Solutions</summary>
|
|
<ol>
|
|
<li>6101</li>
|
|
<li>21909</li>
|
|
</ol>
|
|
</details>
|