File tree 2 files changed +3
-9
lines changed
2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change 28
28
| [ Day 15: Warehouse Woes] ( src/solutions/year2024/day15.rs ) | ⭐⭐ | 7.226 | 9.084 |
29
29
| [ Day 16: Reindeer Maze] ( src/solutions/year2024/day16.rs ) | ⭐ | 6.478 | - |
30
30
| [ Day 17: Chronospatial Computer] ( src/solutions/year2024/day17.rs ) | - | - | - |
31
- | [ Day 18: RAM Run] ( src/solutions/year2024/day18.rs ) | ⭐⭐ | 2.487 | 431.665a |
31
+ | [ Day 18: RAM Run] ( src/solutions/year2024/day18.rs ) | ⭐⭐ | 2.487 | 379.772 |
32
32
| [ Day 19: Linen Layout] ( src/solutions/year2024/day19.rs ) | ⭐⭐ | 2.923 | 22.751 |
33
33
34
34
# 2023
Original file line number Diff line number Diff line change @@ -88,14 +88,8 @@ impl Day18 {
88
88
return true ;
89
89
}
90
90
91
- let neighbours: Vec < Point > = current
92
- . adjacent ( )
93
- . into_iter ( )
94
- . filter ( |p| !blocked. contains ( p) && self . surface . contains ( * p) )
95
- . collect ( ) ;
96
-
97
- for next in neighbours {
98
- if visited. insert ( next) {
91
+ for next in current. adjacent ( ) {
92
+ if visited. insert ( next) && self . surface . contains ( next) && !blocked. contains ( & next) {
99
93
queue. push ( next) ;
100
94
}
101
95
}
You can’t perform that action at this time.
0 commit comments