Driver Code
public static void main ( String [ ] args ) { int N = 6 ; pair [ ] G = { new pair ( 3 , 1 ) , new pair ( 2 , 3 ) , new pair ( 2 , 1 ) , new pair ( 4 , 5 ) , new pair ( 5 , 6 ) , new pair ( 6 , 4 ) } ; int [ ] cost = { 2 , 1 , 5 , 3 , 2 , 9 } ; int M = G . length ; findMinCost ( G , cost , N , M ) ; } }