Skip to content

Commit 685fb66

Browse files
author
AndreyGeonya
committed
document djkstra complexity
1 parent 9c7308f commit 685fb66

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/graphs/shortest-path/dijkstra.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,11 @@
6666
* Dijkstra's shortest path algorithm. Finds the minimum
6767
* distance between two given nodes using a distance matrix.<br><br>
6868
* For the implementation is not used the most suitable data structure
69-
* (Fibonacci heap) but the Binary heap gives also good results.
69+
* (Fibonacci heap) but the Binary heap gives also good results.<br><br>
7070
*
71+
* Time complexity: O(|E|+|V|log(|V|)) where V and E are the number of
72+
* vertices and edges respectively.
73+
*
7174
* @public
7275
* @module graphs/shortest-path/dijkstra
7376
* @param {Number} src Source node.

0 commit comments

Comments
 (0)