diff --git a/README.md b/README.md index 818b392..2580599 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ My (attempted) solutions to [Advent of Code 2020](https://adventofcode.com/2020) in Elixir. -image +image ## Strategy diff --git a/day5/README b/day5/README new file mode 100644 index 0000000..f48fdd8 --- /dev/null +++ b/day5/README @@ -0,0 +1,44 @@ +Day 5 Notes + ++--------+ +| Part 1 | ++--------+ + +$ elixir day5part1.exs +906 + +Thoughts: +Could do something clever with binaries or the Bitwise module? +The number of rows is even (128), but we're zero-indexed (0-127), so how to deal with calculating half? +- in binary, can just shift one bit. But again, we need to halve a range (e.g. 32 to 63) so not sure + how to do that. + +Instead of storing the range, I decided to store the current "front" seat, and how many rows back to count. +Then we can work with 128 which divides by two without worrying about rounding problems. + +When there are only two seats left, just return the correct one based on the flag. + ++--------+ +| Part 2 | ++--------+ + +$ elixir day5part2.exs +519 + +Thoughts: + +Not really sure what the missing front/back seats was about. Decided just to just compare the sorted list +with itself shifted by one (by zipping them), and finding the first ID without a next ID, and assume +the next ID is my seat. +That turned out to be the right answer. + + ++------------------+ +| Overall Thoughts | ++------------------+ + +Looking forward to seeing how others implemented the seat ID parsing. +Did a lot of refactoring here but the end result, especially for part 2, is pretty clean I think. +Even if I decided to refactor the parser, it can just be swapped in for part 2. Zipping was a nice idea. + +I quite enjoyed this one, maybe because it's a Saturday and I wasn't burnt out from work :-) diff --git a/day5/day5part1.exs b/day5/day5part1.exs new file mode 100644 index 0000000..1a6cdeb --- /dev/null +++ b/day5/day5part1.exs @@ -0,0 +1,34 @@ +defmodule Day5Part1 do + use Bitwise + + def run do + File.stream!("input") + |> Stream.map(&seat_id/1) + |> Enum.max() + |> IO.puts() + end + + def seat_id(boarding_pass) do + {row_spec, col_spec} = boarding_pass |> String.trim() |> String.to_charlist() |> Enum.split(7) + + row = + Enum.reduce(row_spec, {0, 128}, fn + ?F, {front, 2} -> front + ?B, {front, 2} -> front + 1 + ?F, {front, count} -> {front, div(count, 2)} + ?B, {front, count} -> {front + div(count, 2), div(count, 2)} + end) + + col = + Enum.reduce(col_spec, {0, 8}, fn + ?L, {left, 2} -> left + ?R, {left, 2} -> left + 1 + ?L, {left, count} -> {left, div(count, 2)} + ?R, {left, count} -> {left + div(count, 2), div(count, 2)} + end) + + row * 8 + col + end +end + +Day5Part1.run() diff --git a/day5/day5part2.exs b/day5/day5part2.exs new file mode 100644 index 0000000..fc28410 --- /dev/null +++ b/day5/day5part2.exs @@ -0,0 +1,42 @@ +defmodule Day5Part2 do + use Bitwise + + def run do + File.stream!("input") + |> Stream.map(&seat_id/1) + |> Enum.sort() + |> find_seat() + |> IO.puts() + end + + def find_seat([_ | next_seats] = seats) do + Stream.zip(seats, next_seats) + |> Enum.find(fn {seat, next} -> next - seat > 1 end) + |> elem(0) + |> Kernel.+(1) + end + + def seat_id(boarding_pass) do + {row_spec, col_spec} = boarding_pass |> String.trim() |> String.to_charlist() |> Enum.split(7) + + row = + Enum.reduce(row_spec, {0, 128}, fn + ?F, {front, 2} -> front + ?B, {front, 2} -> front + 1 + ?F, {front, count} -> {front, div(count, 2)} + ?B, {front, count} -> {front + div(count, 2), div(count, 2)} + end) + + col = + Enum.reduce(col_spec, {0, 8}, fn + ?L, {left, 2} -> left + ?R, {left, 2} -> left + 1 + ?L, {left, count} -> {left, div(count, 2)} + ?R, {left, count} -> {left + div(count, 2), div(count, 2)} + end) + + row * 8 + col + end +end + +Day5Part2.run() diff --git a/day5/input b/day5/input new file mode 100644 index 0000000..47541e9 --- /dev/null +++ b/day5/input @@ -0,0 +1,851 @@ +FFFBBFBLLR +BFBBBFFRLR +BFBBBBFLRR +BBFBFFFLLR +BBFBFBFLLL +BFBFBFBLLR +FBBFFBFRLR +BFFBBBFLLR +FBFBFFBRLR +FBFFBFFRRR +BBFFFFFLRL +FFBFBBFLLL +BFBBBFBRLL +BFFBBFFRRR +BBFBBFBLLR +BBFBBBBRLL +FFBFFBBRRL +FBFBBFFLLR +BFFFBFBRLL +BFBFBBBRRR +FBBFBF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