Module aoc::year2020::day05

source ·
Expand description

§Binary Boarding

The entire part one description is an obfuscated way to describe that each seat id is a 10 bit binary number, where B and R mean a 1 bit in that position and F and L mean a 0 bit.

To solve part two we can have a little fun. Since we know that only a single seat is missing if we XOR together all the seat ids from min to max then XOR with the actual seat ids, the result will be our missing seat id.

Structs§

Functions§