Driver code
public static void Main ( String [ ] args ) { int n = 5 ; List < int > [ ] adj = new List < int > [ n + 1 ] ; for ( int i = 0 ; i < n + 1 ; i ++ ) adj [ i ] = new List < int > ( ) ; adj [ 1 ] . Add ( 2 ) ; adj [ 1 ] . Add ( 3 ) ; adj [ 2 ] . Add ( 4 ) ; adj [ 3 ] . Add ( 5 ) ; Console . WriteLine ( findMaxEdges ( adj , n ) ) ; } }