Driver code
static void Main ( ) { for ( int i = 0 ; i < 100000 ; i ++ ) { edges . Add ( new List < int > ( ) ) ; } int [ , ] A = { { 1 , 2 } , { 2 , 3 } , { 3 , 4 } } ; for ( int i = 0 ; i < 3 ; i ++ ) { Add_edge ( A [ i , 0 ] , A [ i , 1 ] ) ; }