Dijkstra’s : https://youtu.be/oAUHDsymvjM?si=sVIuqPkT6zah8mJv
Bellman ford: https://youtu.be/Ba-3X5wwpQ8?si=LrtmQ_m1uzk1hfU2
The Floyd–Warshall algorithm is a dynamic programming technique used to find the shortest paths between all pairs of vertices in a weighted graph. It works for both directed and undirected graphs and can handle negative edge weights (but not negative cycles).
In this algorithm, we gradually improve the shortest path between every pair of nodes by considering each vertex as an intermediate point. At each step, it checks whether passing through a new vertex provides a shorter path than the current known distance.
Its time complexity is O(n³), making it suitable for smaller graphs or dense networks.