aoc2024/day-16/internal/one/solve.go

23 lines
284 B
Go

package one
import (
"bytes"
)
var LowestCost int
func Solve(buf []byte) (int, error) {
r := bytes.NewReader(buf)
graph, err := parseLines(r)
if err != nil {
return 0, err
}
LowestCost, err = graph.dijkstra()
if err != nil {
return 0, err
}
return LowestCost, nil
}