2022 rust day 12
This commit is contained in:
parent
36d8191f67
commit
9ee78e0f27
|
@ -90,6 +90,7 @@ fn solve1((start, goal, grid): &Data) -> usize {
|
|||
|
||||
|
||||
fn solve2((_, goal, grid): &Data) -> usize {
|
||||
// very ineffective! ideally we should execute the algorithm just once
|
||||
grid.cell_indices()
|
||||
.filter_map(|index| match grid[index] == 0 {
|
||||
true => Some(index),
|
||||
|
|
Loading…
Reference in a new issue