Given a Graph with a set of 5 nodes, 2 of which are goal nodes.
By running the algorithm it finds goal-1 node with a cost of 7 and it terminates.
Although, there's another goal, goal-2, with a cost of 6.
Is, finding the goal-1 as first solution correct? Or the optimal solution is for the A* to find the goal-2 with the cost of 6?