Compare commits

..

1 Commits

View File

@ -45,8 +45,6 @@ fn parse(input: &str) -> Vec<u32> {
} }
/// Finds pairs of numbers in `nums` that sum to 2020. If no pairs are found, the function panics. /// Finds pairs of numbers in `nums` that sum to 2020. If no pairs are found, the function panics.
/// TODO(wathiede): make a version that sorts or uses a hash for finding the match to compare
/// benchmarks.
#[aoc(day1, part1, linear)] #[aoc(day1, part1, linear)]
fn find_pair_2020_linear(nums: &[u32]) -> u32 { fn find_pair_2020_linear(nums: &[u32]) -> u32 {
for (idx, first) in nums.iter().enumerate() { for (idx, first) in nums.iter().enumerate() {