I have a weighted Graph with all positive weights.I need to find the shortest path from vertex x to vertex y. Should I prefer in this case the Floyd–Warshall algorithm over Dijkstra's algorithm since I'm not interested in shortest path from a single source to all vertices but just between specific 2. I can restrict Floyd–Warshall to care only about the 2 vertices of interest, x and y. In that case it looks to me that Floyd–Warshall can find he shortest path from vertex x to vertex y in O(|V|).
Is that correct ?
Thanks!