Driver code
int main ( ) { int n = 5 ; vector < int > adj [ n + 1 ] ; adj [ 1 ] . push_back ( 2 ) ; adj [ 1 ] . push_back ( 3 ) ; adj [ 2 ] . push_back ( 4 ) ; adj [ 3 ] . push_back ( 5 ) ; cout << findMaxEdges ( adj , n ) ; return 0 ; }