This project involves
- Vertex/Vertices
- Edge/Edges
- Adjacent list
- Disjoint-set/Union
- Heaps/Priority Queues
- Acyclic undirected graph
- Kruskal algorithm
Steps to find the minimum cost of connected highway (From Destination A to Destination B)
- Find all weighted edges (Find all vertices and caculate the weighted edge)
- Store all weighted edges Priority Queues (Minimum spanning tree)
- Dequeue the Priority Queues (The first will be the smallest or cheapest connection)
- Unions or subset the edges that did not have similar parent vertex or node. (To avoid cycle)
- Repeat untill the edges are connected to from destination A to destination B.