Skip to content

Devilmoon/AoC2020

Repository files navigation

AoC2020

Solutions for Advent of Code 2020 in Python

Interesting solutions / code

Day 5: Alternative solution using binary instead of search. More efficient but not by much, it would be considerably faster if using pypy. see Here

Day 7: clean recursive solution for Part 2

Day 9: Break cleanly from two loops, reusable

Day 10: Clever solution for Part 2, solved in almost linear time

Day 12: Might be reusable when dealing with a compass/cardinal directions

Day 13: Part 2 uses a clever solution (based on Chinese Remainder Theorem?)

Day 14: Alternative solution for part 2 is very clever, uses a generator to yield all possible combinations, might be reusable in other problems

Day 17: 3D and 4D Conway's Game of Life. Could be used as the basis for a visualization.

Day 18: Shunting-yard algorithm and computation of reverse polish notation. Reusable with different operator precedence settings.

Day 23: Circular (singly) linked list with hashmap for O(1) lookup on elements. Can be extend for other needs.

Day 24: Hex Game of Life, cube coordinates for hex plane/map

About

Solutions for Advent of Code 2020 in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages