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