Find Minimum Spanning Tree using Prim's Algorithm of Graph | Representation of Graph using Adjacency List
Problem Statement:- You have a business with several offices; you want to lease phone lines to connect them up with each other, and the phone company charges different amounts of money to connect different pairs of cities. You want a set of lines that connect all your offices with a minimum total cost. Solve the problem by suggesting appropriate data structures. Note :- Scroll horizontally to see the full line of code. #include < iostream > using namespace std ; class flagarray { string data ; int flag ; public : flagarray () { this -> data = "" ; this -> flag = 0 ; } flagarray ( string data , int flag ) { this -> data = data ; this -> flag = flag ; } friend class node ; friend class graph ; }; cla...