My solutions for the adventofcode.com
This year I'm attempting them in Kotlin. I'd like to think I'd get further however I'm time poor.
- Day 1 Just getting my feet wet, so far so good. Learned about Kotlin objects
- Day 2 First extension method, found out about
toTypedArray
. Cheeky bit of recursion - Day 3 Wow! great puzzle. 1st part done. Kotlin generators are great. Part2 : FML
- Day 4 Looking for a scan function but none found. Nice little extension for whitespace
- Day 5 Done. More tailrec. Used
.drop(n)
function on sequence. Nice - Day 6 ...
- Day 7 Trees! Destructed mulitple groups from a regex. Lovely
- Day 8
- Day 9 Nothing new here
- Day 10 Default params,
by lazy
, slices and nicely reused the circular index. Wow part 2, difficult to read - Day 11 Hex coords
- Day 12 Dijkstra's shortest path! Some nie type aliasing, elvis operator and even a spread operator. A total dogs dinner of an implmentation of the algorithm though. Very imperative.