Compare commits
1 Commits
bc8de05d69
...
10e760c49d
| Author | SHA1 | Date | |
|---|---|---|---|
| 10e760c49d |
@ -45,6 +45,8 @@ fn parse(input: &str) -> Vec<u32> {
|
||||
}
|
||||
|
||||
/// 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)]
|
||||
fn find_pair_2020_linear(nums: &[u32]) -> u32 {
|
||||
for (idx, first) in nums.iter().enumerate() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user