Given Edges
int [ , ] Edges = { { 0 , 1 } , { 1 , 2 } , { 1 , 4 } , { 3 , 4 } , { 4 , 5 } } ; for ( int i = 0 ; i < edges . Length ; i ++ ) edges [ i ] = new List < int > ( ) ; maximumCost ( 1 , - 1 , N , M , arr , Edges ) ; Console . Write ( ans ) ; } }