2022 rust day 12

This commit is contained in:
Maciej Jur 2022-12-12 17:38:08 +01:00
parent 36d8191f67
commit 9ee78e0f27

View file

@ -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),