This project provides solutions to the Advent of Code 2016.
Solutions can be ran from Python 2.7. Inputs of the problems are in the 'inputs' directory.
For instance :
$ python day01.py
- Day 1: No Time for a Taxicab
- Day 2: Bathroom Security
- Day 3: Squares With Three Sides
- Day 4: Security Through Obscurity
- Day 5: How About a Nice Game of Chess?
- Usage of hashlib and hexdigest
- Day 6: Signals and Noise
- Usage of collections.Counter
- Day 7: Internet Protocol Version 7
- Usage of re to split a string given more than one delimiter
- Implementation of 'slice_n' for a string (generator of substring of size 'n')
- Day 8: Two-Factor Authentication
- Day 9: Explosives in Cyberspace
- Regular expression (via re)
- Recursivity
- Day 10: Balance Bots
- Day 11: Radioisotope Thermoelectric Generators
- Solution is based on A* algorithm (there is a need to tweak the heuristics)
- Input is manually set in the code
- Usage of itertools, heapq
- Usage of immutable datastructure (tuples)
- Day 12: Leonardo's Monorail
- Naive solution using regex
- Takes some time for part 2
- Day 13: A Maze of Twisty Little Cubicles
- Solution is based on Dijkstra's algorithm
- Usage of heapq (PriorityQueue)
- Day 14: One-Time Pad
- Usage of hashlib and hexdigest
- Usage of regex backreferences
- Caching results of stretch hash for efficiency (part 2)
- Day 15: Timing is Everything
- Day 16: Dragon Checksum
- Day 17: Two Steps Forward
- First part: breadth-first search (BFS)
- Day 18: Like a Rogue
- Day 19: An Elephant Named Joseph
- Second part uses a double-linked list for solving this kind of pop/append problem
- Day 20: Firewall Rules
- Day 21: Scrambled Letters and Hash
- Usage of permutations from itertools for part 2 (brute-forcing)
- Day 22: Grid Computing
- Part 2 is resolved manually by displaying the grid
- Day 23: Safe Cracking
- Reusing solution of day 12
- Part 2 is solved by hacking the interpreter between line 4 and 10
- Day 24: Air Duct Spelunking
- Reusing implementation of day 13 (Dijkstra's algorithm)
- Day 25: Clock Signal
- Adapting solutions of day 12 and 23
- Solutions is found by brute-forcing and checking the first 100 generated items
GPLv3 - see the COPYING file.