3 ms·
You'll compute paths along the way but won't know that they're the shortest path. Odds are good though that you'll havr found something good enough for most pu
by simcop2387 6y ago
You'll compute paths along the way but won't know that they're the shortest path. Odds are good though that you'll havr found something good enough for most purposes though.
- whoisburbansky 6y agoIf all you do is iterate over the adjacency matrix, sure, but wouldn't Floyd-Warshall be the same time complexity? All I'm saying is that you get both pieces of information for essentially the same price, modulo constant factors.