Driver code
static void Main ( ) { int N = 5 ; ArrayList edges = new ArrayList ( ) ; for ( int i = 0 ; i < MAX ; i ++ ) { adj . Add ( new ArrayList ( ) ) ; } edges . Add ( new pair ( 5 , 1 ) ) ; edges . Add ( new pair ( 5 , 2 ) ) ; edges . Add ( new pair ( 1 , 2 ) ) ; edges . Add ( new pair ( 2 , 3 ) ) ; edges . Add ( new pair ( 2 , 4 ) ) ; Console . Write ( minNodetoRemove ( N , edges ) ) ; } }