Driver Code
public static void Main ( String [ ] args ) { char [ , ] board = { { ' A ' , ' B ' , ' C ' , ' E ' } , { ' S ' , ' F ' , ' C ' , ' S ' } , { ' A ' , ' D ' , ' E ' , ' E ' } } ; String word = " CFDASABCESEE " ; for ( int i = 0 ; i < board . GetLength ( 0 ) ; i ++ ) { for ( int j = 0 ; j < board . GetLength ( 1 ) ; j ++ ) { if ( board [ i , j ] == word [ 0 ] && checkWord ( board , word , 0 , i , j ) ) { Console . WriteLine ( " True " ) ; return ; } } } Console . WriteLine ( " False " ) ; } }