Driver Code
var V = 6 , E = 5 ; var cost = [ 12 , 25 , 8 , 11 , 10 , 7 ] ; addEdge ( 1 , 2 ) ; addEdge ( 1 , 3 ) ; addEdge ( 3 , 2 ) ; addEdge ( 2 , 5 ) ; addEdge ( 4 , 6 ) ; var min_cost = minimumCost ( V , cost ) ; document . write ( min_cost ) ;