Day 6 part 2 done
This commit is contained in:
parent
6a8ea1b392
commit
58e7eb909e
@ -48,4 +48,9 @@ fn main() {
|
||||
let solution = prob6::solve_part1(include_str!("../prob6_part1.txt"));
|
||||
println!("Solution for problem 6 part 1: {solution}");
|
||||
}
|
||||
{
|
||||
let _file_path = "prob6_part1.txt";
|
||||
let solution = prob6::solve_part2(include_str!("../prob6_part1.txt"));
|
||||
println!("Solution for problem 6 part 2: {solution}");
|
||||
}
|
||||
}
|
||||
|
@ -11,3 +11,7 @@ fn begin_datagram(datagram: &str, size: usize) -> usize {
|
||||
pub fn solve_part1(content: &str) -> i32 {
|
||||
begin_datagram(content, 4) as i32
|
||||
}
|
||||
|
||||
pub fn solve_part2(content: &str) -> i32 {
|
||||
begin_datagram(content, 14) as i32
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user