I have a weighted and undirected graph G with n vertices. Two of these vertices are X and Y. I need to find the short
G
n
X
Y
Try to look at Dijkstra's algorithm
The basic idea is to filter the routes that traverse all the nodes and get the route with the shortest path.
Bu actually this may be not an optimal way.