Dijkstra's Algorithm vs Prim's Algorithm

Pubblicato il: 04 ottobre 2019
sul canale di: Back To Back SWE
69,583
1.6k

Free 5-Day Mini-Course: https://backtobackswe.com
Try Our Full Platform: https://backtobackswe.com/pricing
📹 Intuitive Video Explanations
🏃 Run Code As You Learn
💾 Save Progress
❓New Unseen Questions
🔎 Get All Solutions
Subscribe To Live Tech Offers: https://offerfeed.io
Join Our Coaching Service: https://backtobackswe.com/coaching

This is a video walking through & contrasting Dijkstra's Algorithm & Prim's Algorithm based on the greedy choices each algorithm is optimized to make.

Prim's algorithm optimizes for the min-cost edge that connects the subset of vertices not in the minimum spanning tree to the subset of vertices in the minimum spanning tree we are trying to expand. We ensure every iteration we are choosing the min-cost edge that crosses the cut (wikipedia: a 'cut' is a partition of the vertices of a graph into two disjoint subsets).

Dijkstra's algorithm optimizes for the shortest cost path to get from the start vertex to a given vertex. We ensure every iteration we are improving our tentative costs from a fully optimized vertex.


In questa pagina del sito puoi guardare il video online Dijkstra's Algorithm vs Prim's Algorithm della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Back To Back SWE 04 ottobre 2019, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 69,583 volte e gli è piaciuto 1.6 mille spettatori. Buona visione!