Skip to content

Commit

Permalink
fix two utility function issues
Browse files Browse the repository at this point in the history
  • Loading branch information
devries committed Dec 17, 2023
1 parent 7882e60 commit 889e522
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion utils/dijkstra.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (b *DijkstraSearch[T]) Run(g WeightedGraph[T]) (T, error) {
}
}

return initState, BFSNotFound
return initState, DijkstraNotFound
}

// GetPath returns the shortest from the starting node to the given node.
Expand Down
2 changes: 1 addition & 1 deletion utils/point.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (p Point) Left() Point {
return Point{-p.Y, p.X}
}

// Return manhattan magnitude (abs(x)+abs(y))
// Return manhattan distance (abs(x)+abs(y))
func (p Point) Manhattan() int {
return abs(p.X) + abs(p.Y)
}
Expand Down

0 comments on commit 889e522

Please sign in to comment.