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