Remove redundant line of code
This commit is contained in:
@@ -119,9 +119,7 @@ let part2 (grid, start_pos) =
|
|||||||
let rec impl acc lst =
|
let rec impl acc lst =
|
||||||
match dijkstra (visit_max grid visited_grid) (check_end grid) lst with
|
match dijkstra (visit_max grid visited_grid) (check_end grid) lst with
|
||||||
| None -> acc
|
| None -> acc
|
||||||
| Some (_, states, remainder) ->
|
| Some (_, states, remainder) -> impl (states :: acc) remainder
|
||||||
List.iter (fun x -> visited_grid.(visited_idx grid x) <- 0) states;
|
|
||||||
impl (states :: acc) remainder
|
|
||||||
in
|
in
|
||||||
impl [] [ (0, [ ((1, 0), start_pos) ]) ]
|
impl [] [ (0, [ ((1, 0), start_pos) ]) ]
|
||||||
|> List.concat |> List.map snd |> List.sort_uniq compare |> List.length
|
|> List.concat |> List.map snd |> List.sort_uniq compare |> List.length
|
||||||
|
Reference in New Issue
Block a user