File tree Expand file tree Collapse file tree 5 files changed +38
-6
lines changed
Expand file tree Collapse file tree 5 files changed +38
-6
lines changed Original file line number Diff line number Diff line change 99
1010# 2025
1111
12- | Day | Solved | Part 1 time (ms) | Part 2 time (ms) |
13- | -----------------------------------------------------------| :------:| -----------------:| -----------------:|
14- | [ Day 1: Secret Entrance] ( src/solutions/year2025/day01.rs ) | ⭐ | 0.144 | - |
15- | [ Day 2: Gift Shop] ( src/solutions/year2025/day02.rs ) | ⭐⭐ | 65.103 | 81.719 |
16- | [ Day 3: Lobby] ( src/solutions/year2025/day03.rs ) | ⭐⭐ | 0.131 | 0.133 |
12+ | Day | Solved | Part 1 time (ms) | Part 2 time (ms) |
13+ | ---------------------------------------------------------------| :------:| -----------------:| -----------------:|
14+ | [ Day 1: Secret Entrance] ( src/solutions/year2025/day01.rs ) | ⭐ | 0.144 | - |
15+ | [ Day 2: Gift Shop] ( src/solutions/year2025/day02.rs ) | ⭐⭐ | 65.103 | 81.719 |
16+ | [ Day 3: Lobby] ( src/solutions/year2025/day03.rs ) | ⭐⭐ | 0.131 | 0.133 |
17+ | [ Day 4: Printing Department] ( src/solutions/year2025/day04.rs ) | - | - | - |
1718
1819# 2024
1920
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ pub fn solution(puzzle_day: PuzzleDay) -> Box<dyn Solution> {
1818 1 => Box :: new ( year2025:: day01:: Day01 ) ,
1919 2 => Box :: new ( year2025:: day02:: Day02 ) ,
2020 3 => Box :: new ( year2025:: day03:: Day03 ) ,
21+ 4 => Box :: new ( year2025:: day04:: Day04 ) ,
2122 _ => panic ! ( "Day not exist" ) ,
2223 } ,
2324 Year :: Year2024 => match i {
Original file line number Diff line number Diff line change @@ -74,7 +74,10 @@ impl Day03 {
7474 let search_slice = & numbers[ start_index..=end_index] ;
7575
7676 let max_digit = * search_slice. iter ( ) . max ( ) . unwrap ( ) ;
77- let max_digit_offset = search_slice. iter ( ) . position ( |& digit| digit == max_digit) . unwrap ( ) ;
77+ let max_digit_offset = search_slice
78+ . iter ( )
79+ . position ( |& digit| digit == max_digit)
80+ . unwrap ( ) ;
7881
7982 result_digits. push ( max_digit) ;
8083 start_index += max_digit_offset + 1 ;
Original file line number Diff line number Diff line change 1+ use crate :: solutions:: Solution ;
2+
3+ pub struct Day04 ;
4+
5+ impl Solution for Day04 {
6+ fn part_one ( & self , _input : & str ) -> String {
7+ String :: from ( "0" )
8+ }
9+
10+ fn part_two ( & self , _input : & str ) -> String {
11+ String :: from ( "0" )
12+ }
13+ }
14+
15+ #[ cfg( test) ]
16+ mod tests {
17+ use crate :: solutions:: year2025:: day04:: Day04 ;
18+ use crate :: solutions:: Solution ;
19+
20+ const EXAMPLE : & str = r#""# ;
21+
22+ #[ test]
23+ fn part_one_example_test ( ) {
24+ assert_eq ! ( "0" , Day04 . part_one( EXAMPLE ) ) ;
25+ }
26+ }
Original file line number Diff line number Diff line change 11pub mod day01;
22pub mod day02;
33pub mod day03;
4+ pub mod day04;
You can’t perform that action at this time.
0 commit comments