κ·Έλν μκ³ λ¦¬μ¦Intermediate
νλ¦Ό μ΅μ μ μ₯ νΈλ¦¬
MSTλ₯Ό MSTκ° μλ μ μ μ μ°κ²°νλ μ΅μ κ°μ€μΉ κ°μ μ μΆκ°νμ¬ ν λ²μ ν μ μ μ© MSTλ₯Ό μ±μ₯μν€λ νμ μκ³ λ¦¬μ¦μ λλ€. O(E log V) 볡μ‘λλ₯Ό μν΄ μ°μ μμ νλ₯Ό μ¬μ©νλ©° λ°μ§ κ·Έλνμ μ΅μ μ λλ€. μΈμ νλ ¬μ λν΄ ν¬λ£¨μ€μΉΌλ³΄λ€ ꡬνμ΄ λ κ°λ¨ν©λλ€. λ€νΈμν¬ μ€κ³, κ·Όμ¬ μκ³ λ¦¬μ¦, νμμ μ ν μ΄ν΄μ μμ©μ΄ μμ΅λλ€.
#graph#minimum-spanning-tree#greedy#priority-queue
Complexity Analysis
Time (Average)
O(E log V)Expected case performance
Space
O(V)Memory requirements
Time (Best)
O(E log V)Best case performance
Time (Worst)
O(E log V)Worst case performance
π CLRS Reference
Introduction to Algorithmsβ’Chapter 23β’Section 23.2
Loading...
Implementation