Skip to content

Commit 2522529

Browse files
Update 1168.optimize-water-distribution-in-a-village-en.md
1 parent b876d37 commit 2522529

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

problems/1168.optimize-water-distribution-in-a-village-en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ As below pic:
6666
From pictures, we can see that all nodes already connected with minimum costs.
6767

6868
#### Complexity Analysis
69-
- *Time Complexity:* `O(ElogE) - E number of edge in graph`
69+
- *Time Complexity:* `O(ElogE + ElogV) - E number of edge in graph, to do the operation in the union and find for each edge in the list
7070
- *Space Complexity:* `O(E)`
7171

7272

@@ -191,4 +191,4 @@ class Solution:
191191
4. [Bellman–Ford algorithm](https://www.wikiwand.com/en/Bellman%E2%80%93Ford_algorithm)
192192
5. [Kruskal's algorithm](https://www.wikiwand.com/en/Kruskal%27s_algorithm)
193193
6. [Prim's algorithm](https://www.wikiwand.com/en/Prim%27s_algorithm)
194-
7. [Minimum spanning tree](https://www.wikiwand.com/en/Minimum_spanning_tree)
194+
7. [Minimum spanning tree](https://www.wikiwand.com/en/Minimum_spanning_tree)

0 commit comments

Comments
 (0)