Driver code
int main ( ) { int N = 5 ; vector < pair < int , int > > edges ; edges . push_back ( make_pair ( 5 , 1 ) ) ; edges . push_back ( make_pair ( 5 , 2 ) ) ; edges . push_back ( make_pair ( 1 , 2 ) ) ; edges . push_back ( make_pair ( 2 , 3 ) ) ; edges . push_back ( make_pair ( 2 , 4 ) ) ; cout << minNodetoRemove ( N , edges ) ; }