Driver code
static void Main ( ) { for ( int i = 0 ; i < MAX ; i ++ ) adjacent . Add ( new List < int > ( ) ) ; N = 4 ; adjacent [ 1 ] . Add ( 2 ) ; adjacent [ 2 ] . Add ( 1 ) ; adjacent [ 1 ] . Add ( 3 ) ; adjacent [ 3 ] . Add ( 1 ) ; adjacent [ 1 ] . Add ( 4 ) ; adjacent [ 4 ] . Add ( 1 ) ; findNodes ( ) ; Console . WriteLine ( " ( " + startnode + " , ▁ " + endnode + " , ▁ " + thirdnode + " ) " ) ; } }