Advent of Code 2018, Day 3

Sun 30 December 2018

Part 1

There’s some parsing needed on the input file, and because there doesn’t seem much point in writing the parsing code myself, I used the text_io crate.

Also, I needed some representation of the rectangles, so I wrote a simple implementation with some tests for a method …

Advent of Code 2018, Day 1

Wed 26 December 2018

Part 1

Very simple. Just a matter of summing up the lines.

Given this is the first time I’m writing non-trivial Rust, I ran into a small issue. Initially, my main function used the default return type of (), so when I compiled my code, I got this:

warning: unused …

Advent of Code 2018, Day 2

Wed 26 December 2018

Part 1

This one has us applying a simple algorithm to a list of strings to extract some characteristics of a string - specificially, whether a given string contains exactly two or three of any letter - then summing up how many each of these characteristics applies to the strings, and multiplying …