advent-of-code/2022/13/README.md
2022-12-13 13:49:51 +01:00

552 B

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.

Solutions
  1. 6101
  2. 21909