Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8a87b51

Browse files
Fixed typo.
1 parent 834856e commit 8a87b51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎leetcode/medium/1135_connecting_cities_with_minimum_cost.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ If there was a real adaptable priority queue, there would be a feature to update
2323
To read more about adaptable priority queues, check out [Data Structures and Algorithms in Python 1st Edition](https://www.amazon.com/Structures-Algorithms-Python-Michael-Goodrich/dp/1118290275).
2424

2525
This example is more of a lazy heap implementation, looking at the heapq documentation, they show an implementation of a lazy adaptable priority queue.
26-
This will help us to get O((V + E)logV) run-time.
27-
Without performing the lazy delete technique with a heaq, we would get O(V^2(V + E)logV) run-time.
26+
This will help us get O((V + E)logV) run-time.
27+
Without performing the lazy delete technique with a heaq, we would get O((V + E)^2logV) run-time.
2828
That is because in a undirected dense graph, we would be adding duplicate entries of the same nodes into the heap.
2929
There are a lot of incorrect implementations of Prim's Algorithm using heapq that do not perform lazy deletes out there, so be warned.
3030

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /