Skip to content

Commit

Permalink
Documentation | Started 'Most Challenging Day' (Part of #7)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomPlum committed May 6, 2020
1 parent 17f1e02 commit a1a9633
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,24 @@
![GitHub closed issues](https://img.shields.io/github/issues-closed/TomPlum/advent-of-code-2019?color=brightgreen)
![GitHub](https://img.shields.io/github/license/TomPlum/advent-of-code-2019?color=informational)

## About
Working through it while learning [Kotlin](https://kotlinlang.org/). Acts as a nice format for personal development.
I'm treating the code-base a little more _enterprise-esque_, for lack of a better term.
Meaning I'm focusing more on design, readability, ensuring code is test-driven with full coverage etc.
Meaning I'm focusing more on design, readability, and ensuring code is test-driven with full coverage etc.
This doesn't mean, however, that I'm not considering performance. Any solutions that don't meet a respectable order of
runtime complexity will be refactored and improved upon in a later pass of the days.

## The Days

### Most Challenging
Day 18. This day was add one. Usually, the implementation is the 'easy' bit, and figuring out the theory behind the
solution is the harder bit that can take a while. However, Day 18s theory was simple. It was a maze
filled with doors with corresponding keys, and you had the find the shortest path to collect all keys. So it was just
a case of using an exhaustive DFS (Depth First Search) Algorithm that would graph all the keys and their respective
weights to any other accessible ones. Then running Djiksta's Algorithm on the weighted graph to find the shortest path.
I just couldn't figure out how to implement it. I spent so many hours trying different things until I eventually
managed to get 4 of the 5 examples working. Example 5, however, just ran indefinitely and so did my puzzle input.

## Answer Table

| Day | Part 1 | Part 2 | Name |
Expand Down

0 comments on commit a1a9633

Please sign in to comment.