Driver Code
public static void Main ( String [ ] args ) { int N = 2 ; List < int > [ ] graph = new List < int > [ N * N + 1 ] ; for ( int i = 1 ; i <= N * N ; i ++ ) graph [ i ] = new List < int > ( ) ; insertpath ( graph , N , 1 , 1 , 1 , 2 ) ; insertpath ( graph , N , 1 , 2 , 2 , 2 ) ; Console . WriteLine ( countNonAccessible ( graph , N ) ) ; } }