diff --git a/algorithms/11-paths/2024-01-01-bf-to-astar/01-bf.md b/algorithms/11-paths/2024-01-01-bf-to-astar/01-bf.md index 377036b..05bfb22 100644 --- a/algorithms/11-paths/2024-01-01-bf-to-astar/01-bf.md +++ b/algorithms/11-paths/2024-01-01-bf-to-astar/01-bf.md @@ -107,6 +107,8 @@ finding the path `u → x1 → … → xn → v` to subproblems _Is our solution correct?_ It appears to be correct… We have rather complicated map and our algorithm has finished in an instant with the following output: ``` +Normal cost: 1 +Vortex cost: 5 Graph: ############# #..#..*.*.**# @@ -129,6 +131,8 @@ We can play around a bit with it. The `*` cells can be even vortices that pull you in with a negative price and let you _propel_ yourself out :wink: Let's change their cost to `-1` then. Let's check what's the fastest path to the cell. ``` +Normal cost: 1 +Vortex cost: -1 Graph: ############# #..#..*.*.**# @@ -239,6 +243,8 @@ auto bf_finite(const graph& g, const vertex_t& source, And we get the following result: ``` +Normal cost: 1 +Vortex cost: -1 Graph: ############# #..#..*.*.**#