return minimum moves from source to sink
return level [ d ] ; } bool isSafe ( int i , int j , int M [ ] [ N ] ) { if ( ( i < 0 i > = N ) || ( j < 0 j > = N ) M [ i ] [ j ] == 0 ) return false ; return true ; }