Module aoc::year2021::day03

source ·
Expand description

§Binary Diagnostic

Part 1 uses bit manipulation to build up the binary numbers directly one digit at a time.

Part 2 clones the input vec then uses swap_remove to efficiently discard numbers that don’t meet the criteria without having to move all subsequent elements.

Structs§

Functions§