Function to find if ( i , j ) is a valid cell for the knight to move and it exists within the chessboard
function isSafe ( i , j , n , Board ) { return i >= 0 && j >= 0 && i < n && j < n && Board [ i ] [ j ] == 0 ; }